build: bump org.junit:junit-bom from 6.0.2 to 6.0.3 #2590
Workflow file for this run
This file contains hidden or 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: Test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| push: | |
| branches: | |
| - main | |
| - temp/hotfix | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-test: | |
| name: Unit test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Set permissions for ${{ secrets.GITHUB_TOKEN }} | |
| # https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
| packages: read | |
| pull-requests: write | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME}} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| steps: | |
| - name: Run checkout github action | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: 'true' | |
| submodules: 'true' | |
| fetch-depth: 0 | |
| - name: Set up GitHub runner | |
| uses: ./actions/setup-runner | |
| - name: Cache mobile-android-pipelines build | |
| uses: ./actions/cache-pipelines-build | |
| - name: Unit test | |
| id: unit-tests | |
| # Exclude Konsist unit tests which are actually lint checks | |
| # Build all unit tests so that jars are available for Sonar | |
| run: | | |
| ./gradlew assembleDebugUnitTest | |
| ./gradlew testDebugUnitTest -x konsist-test:testDebugUnitTest | |
| ./gradlew testBuildDebugUnitTest | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME }} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| - name: Verify screenshots | |
| run: | | |
| ./gradlew verifyPaparazziDebug | |
| ./gradlew verifyPaparazziBuildDebug | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME }} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| - name: Upload test report | |
| if: ${{ failure() && steps.unit-tests.outcome == 'failure' }} | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: unit-test-reports | |
| path: "**/build/reports/tests/**/*" | |
| # Sonar analyzers must have access to the bytecode to perform an accurate analysis. | |
| # https://community.sonarsource.com/t/sonarscanner-for-gradle-you-can-now-decide-when-to-compile/102069 | |
| - name: Upload jars | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: jars | |
| path: "**/build/**/*.jar" | |
| - name: Upload test coverage report | |
| uses: ./mobile-android-pipelines/actions/upload-coverage-reports | |
| with: | |
| artifact-name: unit-test-coverage | |
| - name: Publish analytics test report | |
| uses: ./actions/publish-analytics-report | |
| with: | |
| path: "build/reports/analytics/*.yml" | |
| - name: Clean workspace | |
| if: ${{ always() }} | |
| uses: ./mobile-android-pipelines/actions/clean-workspace | |
| # Not all the projects are running instrumentation tests. This job is here to check they still compile. | |
| assemble-instrumentation-tests: | |
| name: Assemble instrumentation tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Set permissions for ${{ secrets.GITHUB_TOKEN }} | |
| # https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
| packages: read | |
| steps: | |
| - name: Run checkout github action | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: 'true' | |
| submodules: 'true' | |
| fetch-depth: 0 | |
| - name: Set up GitHub runner | |
| uses: ./actions/setup-runner | |
| - name: Cache mobile-android-pipelines build | |
| uses: ./actions/cache-pipelines-build | |
| - name: Assemble instrumentation tests | |
| run: ./gradlew assembleDebugAndroidTest | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME }} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| - name: Clean workspace | |
| if: ${{ always() }} | |
| uses: ./mobile-android-pipelines/actions/clean-workspace | |
| test-wrapper-instrumentation-test: | |
| name: Run test wrapper instrumentation tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Set permissions for ${{ secrets.GITHUB_TOKEN }} | |
| # https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
| packages: read | |
| steps: | |
| - name: Run checkout github action | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: 'true' | |
| submodules: 'true' | |
| fetch-depth: 0 | |
| - name: Set up GitHub runner | |
| uses: ./actions/setup-runner | |
| - name: Cache mobile-android-pipelines build | |
| uses: ./actions/cache-pipelines-build | |
| - name: Run test wrapper instrumentation tests | |
| # If you need to run tests from different sub-projects, run these in | |
| # parallel, in separate jobs. | |
| run: ./gradlew :test-wrapper:allDevicesBuildDebugAndroidTest | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME }} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| - name: Upload test coverage report | |
| uses: ./mobile-android-pipelines/actions/upload-coverage-reports | |
| with: | |
| artifact-name: test-wrapper-instrumentation-test-coverage | |
| - name: Clean workspace | |
| if: ${{ always() }} | |
| uses: ./mobile-android-pipelines/actions/clean-workspace | |
| sonar-scan: | |
| name: Scan with Sonar | |
| runs-on: ubuntu-latest | |
| needs: | |
| - unit-test | |
| - test-wrapper-instrumentation-test | |
| steps: | |
| - name: Run checkout github action | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: 'true' | |
| submodules: 'true' | |
| fetch-depth: 0 | |
| - name: Set up GitHub runner | |
| uses: ./actions/setup-runner | |
| - name: Cache mobile-android-pipelines build | |
| uses: ./actions/cache-pipelines-build | |
| - name: Download jars | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | |
| with: | |
| name: jars | |
| - name: Download unit test coverage reports | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | |
| with: | |
| name: unit-test-coverage | |
| - name: Download test wrapper instrumentation test coverage reports | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 | |
| with: | |
| name: test-wrapper-instrumentation-test-coverage | |
| - name: Get version | |
| id: versioning | |
| uses: ./mobile-android-pipelines/actions/increment-version | |
| with: | |
| dry-run: true | |
| - name: Scan with Sonar | |
| uses: ./mobile-android-pipelines/actions/sonar-scan | |
| with: | |
| sonar-token: ${{ secrets.SONAR_TOKEN }} | |
| version-name: ${{ github.ref == 'refs/heads/main' && steps.versioning.outputs.new_version }} | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.MODULE_FETCH_TOKEN_USERNAME}} | |
| GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_TOKEN }} | |
| - name: Clean workspace | |
| if: ${{ always() }} | |
| uses: ./mobile-android-pipelines/actions/clean-workspace |