Skip to content

Automatically publish new releases to Hex #20

Automatically publish new releases to Hex

Automatically publish new releases to Hex #20

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: OTP ${{matrix.otp_vsn}}
strategy:
matrix:
otp_vsn: ['28', '27', '26']
rebar_vsn: ['3.27.0']
runs-on: 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_vsn }}
rebar3-version: ${{ matrix.rebar_vsn }}
- uses: actions/cache@v3
name: Cache
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp_vsn }}-${{ hashFiles(format('rebar.lock')) }}-1
restore-keys: ${{ runner.os }}-build-${{ matrix.otp_vsn }}-1-
- run: rebar3 as test compile
- run: rebar3 do xref, dialyzer
if: ${{ matrix.otp_vsn == '28' }}
- run: rebar3 do ct --cover
- run: rebar3 as test codecov analyze
- uses: codecov/codecov-action@v3
with:
name: Upload coverage reports to Codecov
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true