summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2021-04-13 07:15:12 (GMT)
committerSven Nierlein <sven@nierlein.de>2021-04-30 07:56:52 (GMT)
commitfc71e3f9304ed51f3fd7ca544f38a30a590c8ba5 (patch)
tree3697fee9f0e6b4cafb53dd8d743ac7f40dfa2198 /.github/workflows/test.yml
parent444a3579b2168eda949943a060bddff9ec95fd99 (diff)
downloadmonitoring-plugins-fc71e3f9304ed51f3fd7ca544f38a30a590c8ba5.tar.gz
migrate travis ci to github actions
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml77
1 files changed, 77 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..4c3497d
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,77 @@
1name: Test
2
3on:
4 push:
5 branches:
6 - '*'
7 pull_request:
8
9jobs:
10# macos:
11# name: Running tests on ${{ matrix.os }}
12# strategy:
13# fail-fast: false
14# matrix:
15# os:
16# - macos-10.15
17# runs-on: ${{ matrix.os }}
18# steps:
19#
20# - name: Git clone repository
21# uses: actions/checkout@v2
22# #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
23# # uses: mxschmitt/action-tmate@v3
24# - name: Prepare machine
25# run: |
26# brew install automake
27# - name: Run the tests
28# run: |
29# tools/setup \
30# && ./configure --enable-libtap \
31# && make \
32# && make test
33
34 linux:
35 runs-on: ubuntu-latest
36 name: Running tests on ${{ matrix.distro }}
37 strategy:
38 fail-fast: false
39 matrix:
40 distro:
41 #- 'debian:10'
42 - 'debian:testing'
43 #- 'ubuntu:20.10'
44 #- 'centos:7'
45 #- 'centos:8'
46 include:
47 #- distro: 'debian:10'
48 # prepare: .github/prepare_debian.sh
49 - distro: 'debian:testing'
50 prepare: .github/prepare_debian.sh
51 #- distro: 'ubuntu:20.10'
52 # prepare: .github/prepare_debian.sh
53 #- distro: 'centos:7'
54 # prepare: .github/prepare_centos.sh
55 #- distro: 'centos:8'
56 # prepare: .github/prepare_centos.sh
57 steps:
58 - name: Git clone repository
59 uses: actions/checkout@v2
60 #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
61 # uses: mxschmitt/action-tmate@v3
62 - name: Run the tests on ${{ matrix.distro }}
63 run: |
64 docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
65 docker run \
66 -e NPTEST_ACCEPTDEFAULT=1 \
67 -e NPTEST_CACHE="/src/.github/NPTest.cache" \
68 -w /src -v ${PWD}:/src \
69 --tmpfs /media/ramdisk1 \
70 --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
71 ${{ matrix.distro }} \
72 /bin/sh -c '${{ matrix.prepare }} && \
73 tools/setup && \
74 ./configure --enable-libtap && \
75 make && \
76 make test'
77 docker volume rm tmp-vol