File: ci.yml

package info (click to toggle)
erlang-p1-stringprep 1.0.33-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 652 kB
  • sloc: tcl: 892; cpp: 442; erlang: 328; makefile: 34
file content (49 lines) | stat: -rw-r--r-- 1,533 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CI

on: [push, pull_request]

jobs:

  tests:
    name: Tests
    strategy:
      fail-fast: false
      matrix:
        otp: ['20', '25', '26', '27', '28']
    runs-on: ubuntu-24.04
    container:
      image: public.ecr.aws/docker/library/erlang:${{ matrix.otp }}
    steps:
    - uses: actions/checkout@v4
    - run: ./configure --enable-gcov
    - run: rebar3 compile
    - run: rebar3 xref
    - run: rebar3 dialyzer
    - run: rebar3 eunit -v
    - run: rebar3 compile
    - name: Run tests to obtain Erlang coverage
      run: |
        mv test/unload_test.erl .
        rebar3 eunit -v
        mv _build/test/cover/eunit.coverdata .
    - name: Run tests to obtain C coverage
      run: |
        mv unload_test.erl test/
        rebar3 eunit -v
        mv eunit.coverdata _build/test/cover/
    - name: Send to Coveralls
      if: matrix.otp == 27
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        apt-get -qq update
        apt-get -qq install pipx
        pipx install cpp-coveralls
        /github/home/.local/bin/cpp-coveralls -b `pwd` --verbose --gcov-options '\-lp' --dump c.json
        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"}}'