Browse code

Create CI workflow for GitHub actions (#120)

John Hawthorn authored on 15/08/2019 22:30:39 • GitHub committed on 15/08/2019 22:30:39
Showing 1 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,40 @@
1
+name: CI
2
+
3
+on:
4
+  push:
5
+    branches:
6
+    - master
7
+  pull_request:
8
+    branches:
9
+    - master
10
+
11
+jobs:
12
+  test:
13
+    name: Test ${{ matrix.compiler }} on ${{ matrix.os }}
14
+    strategy:
15
+      matrix:
16
+        compiler: [gcc, clang]
17
+        os: [ubuntu-latest, macOS-latest]
18
+    runs-on: ${{ matrix.os }}
19
+    steps:
20
+    - uses: actions/checkout@v1
21
+    - name: Compile and run tests
22
+      run: make && make test
23
+      env:
24
+        CC: ${{ matrix.compiler }}
25
+  acceptance_test:
26
+    name: Acceptance Tests
27
+    runs-on: ubuntu-latest
28
+    steps:
29
+    - uses: actions/checkout@v1
30
+    - name: Set up Ruby 2.6
31
+      uses: actions/setup-ruby@v1
32
+      with:
33
+        ruby-version: 2.6.x
34
+    - name: Install dependencies and compile
35
+      run: |
36
+        gem install bundler
37
+        make
38
+        cd test/acceptance && bundle install --jobs 4 --retry 3
39
+    - name: Run acceptance tests
40
+      run: make acceptance