summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorLorenz <12514511+RincewindsHat@users.noreply.github.com>2023-03-10 10:33:25 (GMT)
committerGitHub <noreply@github.com>2023-03-10 10:33:25 (GMT)
commit5077120a251980b4fafed61b4aa8fa5730a85443 (patch)
tree8500b8f5dbe774b399cfdc79f5665ba88ef7f255 /.github/workflows/test.yml
parenta3de84594104ac87a91e200d569fb57edacca928 (diff)
parent269718094177fb8a7e3d3005d1310495009fe8c4 (diff)
downloadmonitoring-plugins-5077120a251980b4fafed61b4aa8fa5730a85443.tar.gz
Merge branch 'master' into master
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..80d49f7
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,47 @@
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@v3
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 -v /var/run/utmp:/var/run/utmp \
39 --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
40 ${{ matrix.distro }} \
41 /bin/sh -c '${{ matrix.prepare }} && \
42 tools/setup && \
43 ./configure --enable-libtap --with-ipv6=no && \
44 make && \
45 make test'
46 docker container prune -f
47 docker volume prune -f