actions/checkout@v4 updated from node16 to node20, which requires a recent GLIBC 2.27 or 2.28, however some old erlang container images include too old GLIBC
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
name: Tests
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
otp: ['19.3', '25.3', 26, 27]
|
|
runs-on: ubuntu-22.04
|
|
container:
|
|
image: erlang:${{ matrix.otp }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
if: matrix.otp < '20.3'
|
|
- uses: actions/checkout@v4
|
|
if: matrix.otp >= '20.3'
|
|
- run: rebar3 compile
|
|
- run: rebar3 xref
|
|
- run: rebar3 dialyzer
|
|
- run: rebar3 eunit -v
|
|
|
|
cover:
|
|
name: Cover
|
|
needs: [tests]
|
|
runs-on: ubuntu-22.04
|
|
container:
|
|
image: erlang:26
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: ./configure --enable-gcov
|
|
- run: rebar3 compile
|
|
- run: rebar3 eunit -v
|
|
- run: pip install --user cpp-coveralls
|
|
- run: cpp-coveralls -b `pwd` --verbose --gcov-options '\-lp' --dump c.json
|
|
- name: Send to Coveralls
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
ADDJSONFILE=c.json COVERALLS=true rebar3 as test coveralls send
|
|
curl -v -k https://coveralls.io/webhook \
|
|
--header "Content-Type: application/json" \
|
|
--data '{"repo_name":"$GITHUB_REPOSITORY",
|
|
"repo_token":"$GITHUB_TOKEN",
|
|
"payload":{"build_num":$GITHUB_RUN_ID,
|
|
"status":"done"}}'
|