feat(teammanagementlastactivity): implemented route call in TeamInfoCard #3065
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sonarqube scan | |
on: push | |
jobs: | |
backend_scan: | |
name: Sonaqube backend scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Run tests with coverage | |
run: | | |
cd yaki_backend | |
npm install | |
npm run test --coverage | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
with: | |
projectBaseDir: yaki_backend/ | |
# If you wish to fail your job when the Quality Gate is red, uncomment the | |
# following lines. This would typically be used to fail a deployment. | |
# - uses: sonarsource/sonarqube-quality-gate-action@master | |
# timeout-minutes: 5 | |
# env: | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
admin_backend_scan: | |
name: Sonarqube admin backend scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
overwrite-settings: false | |
- name: Cache SonarQube packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
run: | | |
cd yaki_admin_backend | |
echo ${{ secrets.APPLICATION_TEST_PROPERTIES }} | base64 -d > src/test/resources/application-test.properties | |
./gradlew build sonar --info | |
admin_scan: | |
name: Sonaqube admin scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: | | |
cd yaki_admin | |
npm install | |
npm run coverage | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
with: | |
projectBaseDir: yaki_admin/ | |
mobile_scan: | |
name: Sonaqube mobile scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: subosito/flutter-action@v2 | |
- name: Run tests with coverage | |
run: | | |
cd yaki_mobile | |
# Download dependencies | |
flutter pub get | |
# Run analysis | |
flutter analyze | |
# Run tests without user feedback regeneration tests.output and coverage/lcov.info | |
flutter test --machine --coverage > tests.output | |
- name: Sonar-scanner | |
env: | |
SONAR_SCANNER_VER: sonar-scanner-cli-4.8.0.2856-linux | |
SONAR_SCANNER_PATH: sonar-scanner-4.8.0.2856-linux/bin | |
run: | | |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.0.2856-linux.zip | |
unzip sonar-scanner-cli-4.8.0.2856-linux.zip | |
cd yaki_mobile | |
../$SONAR_SCANNER_PATH/sonar-scanner -v | |
../$SONAR_SCANNER_PATH/sonar-scanner \ | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \ | |
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} |