summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: c21bfc1e641f425a975294b2a3b7cea11cd5e55a (plain)
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:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  test:
    name: Test ${{ matrix.compiler }} on ${{ matrix.os }}
    strategy:
      matrix:
        compiler: [gcc, clang]
        os: [ubuntu-latest, macOS-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v1
    - name: Compile and run tests
      run: make && make test
      env:
        CC: ${{ matrix.compiler }}
  test_alpine:
    name: Test on Alpine Linux
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Compile and run tests
      uses: docker://alpine
      with:
        args: sh -c "apk add build-base && make && make test"
  acceptance_test:
    name: Acceptance Tests
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x
    - name: Install dependencies and compile
      run: |
        gem install bundler
        make
        cd test/acceptance && bundle install --jobs 4 --retry 3
    - name: Run acceptance tests
      run: make acceptance