Skip to content

Merge pull request #6 from rabbitmq/MnesiaFun-can-return-aborted-no_e… #105

Merge pull request #6 from rabbitmq/MnesiaFun-can-return-aborted-no_e…

Merge pull request #6 from rabbitmq/MnesiaFun-can-return-aborted-no_e… #105

Workflow file for this run

name: Test
on:
- pull_request
- push
jobs:
Test:
name: Test on Erlang/OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
otp_version: [24, 25, 26]
os: [ubuntu-latest, windows-latest]
exclude:
# `ct_slave` fails to start Erlang nodes on Windows with Erlang 24.
- otp_version: 24
os: windows-latest
env:
RUN_DIALYZER_ON_OTP_RELEASE: 26
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: install-erlang
with:
otp-version: ${{matrix.otp_version}}
rebar3-version: '3.22.1'
- name: Restore Dialyzer PLT files from cache
uses: actions/cache@v3
if: ${{ matrix.otp_version == env.RUN_DIALYZER_ON_OTP_RELEASE && matrix.os == 'ubuntu-latest' }}
with:
path: _build/*/rebar3_*_plt
key: dialyzer-plt-cache-${{ steps.install-erlang.outputs.otp-version }}-${{ runner.os }}-${{ hashFiles('rebar.config*') }}-v1
- name: Compile
run: rebar3 compile
- name: Xref
run: rebar3 xref
- name: EUnit (unit tests)
run: rebar3 eunit --verbose --cover
- name: Common test (integration tests)
run: rebar3 ct --verbose --cover --sname ct
- name: Dialyzer
if: ${{ matrix.otp_version == env.RUN_DIALYZER_ON_OTP_RELEASE && matrix.os == 'ubuntu-latest' }}
run: rebar3 clean && rebar3 as test dialyzer
- name: Generate code coverage report
run: rebar3 as test covertool generate
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: _build/test/covertool/khepri_mnesia_migration.covertool.xml
flags: erlang-${{ matrix.otp_version }},os-${{ matrix.os }}
name: Erlang/OTP ${{ matrix.otp_version }} on ${{ matrix.os }}
verbose: true # optional (default = false)