Merge pull request #358 from aronisstav/fix-actions #114
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: Tests | |
on: | |
push: | |
branches: master | |
pull_request: | |
branches: master | |
paths-ignore: | |
- 'docs/**' | |
schedule: | |
# Run at 00:00 UTC on the first day of each month | |
- cron: '00 00 1 * *' | |
env: | |
THREADS: 2 | |
jobs: | |
basic: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- lint | |
- dialyzer | |
container: erlang:23 | |
name: ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: '~/.cache' | |
key: ${{ runner.os }}-rebar-${{ matrix.target }}-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }} | |
restore-keys: | | |
${{ runner.os }}-rebar-${{ matrix.target }}- | |
${{ runner.os }}-rebar- | |
- run: make ${{ matrix.target }} | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
working-directory: doc | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '24' | |
rebar3-version: nightly | |
- run: make -C doc test | |
tests-latest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
otp: | |
# Two latest minor versions of the most recent OTP release, | |
# if supported. | |
# When a new major OTP release is enabled, also update the badge in | |
# README.md and the argument given to generate_version_hrl in | |
# rebar.config | |
- '23' | |
target: | |
- 'tests-unit' | |
- 'tests-1' | |
- 'tests-2' | |
- 'tests-real' | |
container: erlang:${{ matrix.otp }} | |
name: OTP ${{ matrix.otp }} - ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- if: matrix.target != 'tests-unit' | |
run: .github/scripts/covertool_setup | |
- run: make ${{ matrix.target }} | |
env: | |
CONCUERROR: ${{ github.workspace }}/priv/concuerror | |
CONCUERROR_COVER: ${{ github.workspace}}/cover/data | |
- if: matrix.target == 'tests-unit' | |
run: | | |
rebar3 covertool generate | |
cp _build/test/covertool/concuerror.covertool.xml coverage.xml | |
- if: matrix.target != 'tests-unit' | |
run: | | |
.github/scripts/covertool_combine | |
cp cover/coverage.xml coverage.xml | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: coverage.xml | |
flags: ${{ matrix.target }} | |
tests-older: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Last minor version of older OTP releases | |
otp: | |
- '22' | |
- '21' | |
- '20' | |
target: | |
- 'tests-1' | |
- 'tests-2' | |
- 'tests-real' | |
container: erlang:${{ matrix.otp }} | |
name: OTP ${{ matrix.otp }} - ${{ matrix.target }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make ${{ matrix.target }} |