summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2021-05-21 11:06:37 (GMT)
committerGitHub <noreply@github.com>2021-05-21 11:06:37 (GMT)
commit6946b546feb9635413932861c4256f0067846860 (patch)
tree8f2de1d6bb3359796685d2d3ca8c56ddfd4fc110 /.github/workflows/test.yml
parentf0ac7fcc7c40fab04c00fbbc8c091e89e77b0f74 (diff)
parentb428cc17f75682465e6f1e59b32fdec02b87ceac (diff)
downloadmonitoring-plugins-6946b546feb9635413932861c4256f0067846860.tar.gz
Merge pull request #1686 from monitoring-plugins/feature_github_actions
Migrate to GitHub actions
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..512d28e
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,46 @@
1name: Test
2
3on:
4 push:
5 branches:
6 - '*'
7 pull_request:
8
9jobs:
10# macos:
11# ...
12 linux:
13 runs-on: ubuntu-latest
14 name: Running tests on ${{ matrix.distro }}
15 strategy:
16 fail-fast: false
17 matrix:
18 distro:
19 - 'debian:testing'
20 #...
21 include:
22 - distro: 'debian:testing'
23 prepare: .github/prepare_debian.sh
24 #...
25 steps:
26 - name: Git clone repository
27 uses: actions/checkout@v2
28 #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
29 # uses: mxschmitt/action-tmate@v3
30 - name: Run the tests on ${{ matrix.distro }}
31 run: |
32 docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
33 docker run \
34 -e NPTEST_ACCEPTDEFAULT=1 \
35 -e NPTEST_CACHE="/src/.github/NPTest.cache" \
36 -w /src -v ${PWD}:/src \
37 --tmpfs /media/ramdisk1 \
38 --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
39 ${{ matrix.distro }} \
40 /bin/sh -c '${{ matrix.prepare }} && \
41 tools/setup && \
42 ./configure --enable-libtap --with-ipv6=no && \
43 make && \
44 make test'
45 docker container prune -f
46 docker volume prune -f