aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
blob: b2ec40148737535ec1a8302c9433c05618cc8de9 (plain) (blame)
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
name: CI

on:
  pull_request:

jobs:
  test:
    name: Test on OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
    runs-on: ubuntu-latest

    strategy:
      matrix:
        otp: ['26', '27']
        rebar3: ['3.23']

    steps:
    - name: Checkout code
      uses: actions/checkout@v4

    - name: Setup Erlang/OTP
      uses: erlef/setup-beam@v1
      with:
        otp-version: ${{matrix.otp}}
        rebar3-version: ${{matrix.rebar3}}

    - name: Restore dependencies cache
      uses: actions/cache@v4
      with:
        path: |
          _build
          rebar.lock
        key: ${{ runner.os }}-rebar3-${{ hashFiles('rebar.config') }}
        restore-keys: |
          ${{ runner.os }}-rebar3-

    - name: Compile
      run: rebar3 compile

    - name: Run tests
      run: rebar3 eunit

    - name: Run dialyzer
      run: rebar3 dialyzer