Skip to content

Merge pull request #213 from inaka/coverage #128

Merge pull request #213 from inaka/coverage

Merge pull request #213 from inaka/coverage #128

Workflow file for this run

name: Erlang CI
on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
id: setup-beam
with:
version-type: strict
version-file: .tool-versions
- name: Restore _build
uses: actions/cache@v4
with:
path: _build
key: _build-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore rebar3's cache
uses: actions/cache@v4
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Compile
run: rebar3 compile
- name: Format check
run: rebar3 format --verify
- name: Run tests and verifications
run: rebar3 test
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: "_build/test/covertool/worker_pool.covertool.xml"
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true