Skip to content

Merge pull request #4270 from esl/fix-flaky-sm-test #1111

Merge pull request #4270 from esl/fix-flaky-sm-test

Merge pull request #4270 from esl/fix-flaky-sm-test #1111

Workflow file for this run

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: [ '25.3.2.9', '26.2.2' ]
runs-on: ubuntu-22.04
env:
PRESET: 'small_tests'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/[email protected]
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:
preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia,
ldap_mnesia, elasticsearch_and_cassandra_mnesia]
otp: [ '26.1.2' ]
include:
- test-spec: "default.spec"
- preset: elasticsearch_and_cassandra_mnesia
test-spec: "mam.spec"
- preset: ldap_mnesia
test-spec: "default.spec"
otp: '25.3.2.6'
- preset: pgsql_mnesia
test-spec: "default.spec"
otp: '25.3.2.6'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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:
preset: [pgsql_mnesia, mysql_redis, odbc_mssql_mnesia]
otp: [ '26.1.2' ]
test-spec: ["dynamic_domains.spec"]
include:
- preset: pgsql_mnesia
otp: '25.3.2.6'
test-spec: "dynamic_domains.spec"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/[email protected]
with:
otp-version: ${{matrix.otp}}
- run: tools/test.sh -p dialyzer_only
xref:
name: xref on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
otp: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/[email protected]
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: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/[email protected]
with:
otp-version: ${{matrix.otp}}
- run: tools/test.sh -p edoc_only
pkg:
name: ${{matrix.pkg}} package
strategy:
fail-fast: false
matrix:
pkg: [centos_7, ubuntu_xenial]
runs-on: ubuntu-22.04
env:
ESL_ERLANG_PKG_VER: "25.0.3-1"
pkg_PLATFORM: ${{matrix.pkg}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: tools/test.sh -p pkg