CI #1486
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: 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 | |
| big_tests: | |
| name: ${{matrix.preset}} on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Every supported database is tested with CETS, every internal database with PostgreSQL. | |
| # internal_mnesia is special (Mnesia for everything, plus MinIO and RabbitMQ). | |
| # ldap_mnesia and elasticsearch_and_cassandra_mnesia are not migrated to CETS yet. | |
| preset: [cockroachdb_cets, mysql_cets, pgsql_cets, ldap_mnesia, | |
| elasticsearch_and_cassandra_mnesia, internal_mnesia, | |
| pgsql_mnesia, pgsql_redis] | |
| otp: [ '29.0.3' ] | |
| include: | |
| - test-spec: "default.spec" | |
| # Legacy OTP must be tested on PostgreSQL and CETS | |
| - preset: pgsql_cets | |
| test-spec: "default.spec" | |
| otp: '28.4.2' | |
| 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 | |
| dynamic_domains_big_tests: | |
| name: dynamic domains ${{matrix.preset}} on OTP ${{matrix.otp}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Dynamic domains must be tested for PostgreSQL and CETS | |
| preset: [pgsql_cets] | |
| otp: [ '29.0.3' ] | |
| test-spec: ["dynamic_domains.spec"] | |
| include: | |
| - preset: pgsql_cets | |
| otp: '28.4.2' | |
| test-spec: "dynamic_domains.spec" | |
| 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, dynamic_domains_big_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 |