Merge pull request #4755 from esl/update-erlang-doctor #1495
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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| # required for run_common_test.erl | |
| KEEP_COVER_RUNNING: '1' | |
| SKIP_AUTO_COMPILE: 'true' | |
| # required for tools/gh-upload-to-s3.sh script | |
| AWS_DEFAULT_REGION: "${{ secrets.AWS_DEFAULT_REGION }}" | |
| AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
| AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
| # required for tools/gh-report-failing-testcases-to-ga4.sh script | |
| GA4_API_SECRET: "${{ secrets.GA4_API_SECRET }}" | |
| GA4_MEASUREMENT_API: "${{ secrets.GA4_MEASUREMENT_API }}" | |
| jobs: | |
| small_tests: | |
| name: small_tests on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ## the full list of supported (prebuilt) OTP versions for ubuntu-22.04 runners | |
| ## can be found here: | |
| ## https://builds.hex.pm/builds/otp/ubuntu-22.04/builds.txt | |
| otp: [ '28.4.2', '29.0.3' ] | |
| runs-on: ubuntu-22.04 | |
| env: | |
| PRESET: 'small_tests' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: erlef/setup-beam@v1.16.0 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/rebar3 | |
| key: rebar3-${{ hashFiles('rebar.lock') }} | |
| - name: create certificates | |
| run: make certs | |
| - name: run test | |
| run: tools/test.sh -p $PRESET -s true -e true | |
| - name: prepare coverage report | |
| run: ./rebar3 codecov analyze --lcov --json false | |
| - name: report coverage | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: small_tests on OTP ${{matrix.otp}} | |
| path-to-lcov: ./lcov.info | |
| parallel: true | |
| - name: upload common test results on failure | |
| if: ${{ failure() }} | |
| run: tools/gh-upload-to-s3.sh _build/test/logs test_logs | |
| # The big-test presets are defined once in .circleci/presets.config and shared with | |
| # CircleCI; this job turns them into a GitHub Actions matrix consumed by big_tests below. | |
| generate_matrix: | |
| name: generate big tests matrix | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix: ${{ steps.gen.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false | |
| - uses: erlef/setup-beam@v1.16.0 | |
| with: | |
| otp-version: '28.4.2' | |
| - id: gen | |
| run: echo "matrix=$(tools/generate-presets .circleci/presets.config github 29.0.3 28.4.2)" >> "$GITHUB_OUTPUT" | |
| big_tests: | |
| name: ${{matrix.name}} | |
| needs: generate_matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.generate_matrix.outputs.matrix) }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: ./.github/actions/big-tests | |
| with: | |
| otp: ${{matrix.otp}} | |
| preset: ${{matrix.preset}} | |
| gh-token: ${{secrets.GITHUB_TOKEN}} | |
| test-spec: ${{matrix.test-spec}} | |
| - name: upload common test results on failure | |
| if: ${{ failure() }} | |
| run: tools/gh-upload-to-s3.sh big_tests/ct_report | |
| - name: upload big_tests results to GA4 | |
| if: ${{ !cancelled() && github.ref_name == 'master' }} | |
| run: tools/gh-report-failing-testcases-to-ga4.sh | |
| coveralls_webhook: | |
| needs: [big_tests, small_tests] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Finish coveralls parallel build | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true | |
| dialyzer: | |
| name: dialyzer on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| otp: [ '28.4.2' ] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: erlef/setup-beam@v1.16.0 | |
| with: | |
| otp-version: ${{matrix.otp}} | |
| - run: tools/test.sh -p dialyzer_only | |
| - run: tools/test.sh -p dialyzer_big_tests | |
| xref: | |
| name: xref on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| otp: [ '28.4.2' ] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: erlef/setup-beam@v1.16.0 | |
| with: | |
| otp-version: ${{matrix.otp}} | |
| - run: tools/test.sh -p xref_only | |
| edoc: | |
| name: edoc on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| otp: [ '28.4.2' ] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: erlef/setup-beam@v1.16.0 | |
| with: | |
| otp-version: ${{matrix.otp}} | |
| - run: tools/test.sh -p edoc_only |