Skip to content

Bump Horus to version 0.2.4 #101

Bump Horus to version 0.2.4

Bump Horus to version 0.2.4 #101

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
# 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: 26
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: install-erlang
with:
otp-version: ${{matrix.otp_version}}
rebar3-version: '3.20.0'
- 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: 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@v3
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)