Add docs, specs, linter, elvis, and CI #1
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: ci | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- "*" | |
workflow_dispatch: {} | |
jobs: | |
test: | |
name: OTP ${{matrix.otp}} | |
runs-on: 'ubuntu-24.04' | |
strategy: | |
matrix: | |
otp: ['27', '26', '25'] | |
rebar3: ['3.24.0'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
rebar3-version: ${{matrix.rebar3}} | |
- run: rebar3 compile | |
- run: rebar3 lint | |
- run: rebar3 ex_doc | |
- run: rebar3 fmt --check | |
if: ${{ matrix.otp == '27' }} | |
- run: rebar3 as cowboy2 xref | |
if: ${{ matrix.otp == '27' }} | |
- run: rebar3 as cowboy2 dialyzer | |
if: ${{ matrix.otp == '27' }} | |
- run: rebar3 as cowboy1 do ct, cover, covertool generate | |
- run: rebar3 as cowboy2 do ct, cover, covertool generate | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
files: _build/*/covertool/*.covertool.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |