Merge pull request #220 from tmfg/TIS-458/group_id_admin_task_api #190
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: Verify Commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened] | |
permissions: | |
checks: write # required by scacap/action-surefire-report | |
contents: read # required by scacap/action-surefire-report | |
jobs: | |
verify: | |
name: Verify Pull Request | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./digitraffic-tis-vaco | |
steps: | |
- name: Checkout project files | |
uses: actions/checkout@v4 | |
with: | |
path: digitraffic-tis-vaco | |
- name: Setup project | |
uses: ./digitraffic-tis-vaco/.github/actions/project_setup | |
with: | |
deploy-key: ${{ secrets.DBMIGRATOR_DEPLOY_KEY }} | |
- name: Run tests | |
run: mvn --quiet test | |
- name: Publish test report | |
if: always() | |
uses: scacap/action-surefire-report@v1 | |
sonar: | |
name: Run SonarCloud Analysis | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} # GHA doesn't expose tokens to PRs from forks | |
defaults: | |
run: | |
working-directory: ./digitraffic-tis-vaco | |
steps: | |
- name: Checkout project files | |
uses: actions/checkout@v4 | |
with: | |
path: digitraffic-tis-vaco | |
fetch-depth: 0 | |
- name: Setup project | |
uses: ./digitraffic-tis-vaco/.github/actions/project_setup | |
with: | |
deploy-key: ${{ secrets.DBMIGRATOR_DEPLOY_KEY }} | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn --quiet -B verify -Pcoverage org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=tmfg_digitraffic-tis-vaco |