Bump Horus to version 0.3.0 #142
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: 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, 27] | |
os: [ubuntu-latest, windows-latest] | |
exclude: | |
# `ct_slave` fails to start Erlang nodes on Windows with Erlang 24. | |
- otp_version: 24 | |
os: windows-latest | |
# setup-beam currently hangs for 30+ minutes for Windows builds and | |
# Erlang/OTP 26.0. | |
- otp_version: 26 | |
os: windows-latest | |
env: | |
RUN_DIALYZER_ON_OTP_RELEASE: 27 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
id: install-erlang | |
with: | |
otp-version: ${{matrix.otp_version}} | |
rebar3-version: '3.23.0' | |
- name: Restore Dialyzer PLT files from cache | |
uses: actions/cache@v4 | |
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: env ERL_FLAGS='-enable-feature maybe_expr' rebar3 eunit --verbose --cover | |
- 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@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: _build/test/covertool/horus.covertool.xml | |
flags: erlang-${{ matrix.otp_version }},os-${{ matrix.os }} | |
name: Erlang/OTP ${{ matrix.otp_version }} on ${{ matrix.os }} | |
verbose: true # optional (default = false) |