summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test-next.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/test-next.yml')
-rw-r--r--.github/workflows/test-next.yml90
1 files changed, 90 insertions, 0 deletions
diff --git a/.github/workflows/test-next.yml b/.github/workflows/test-next.yml
new file mode 100644
index 00000000..0e69c251
--- /dev/null
+++ b/.github/workflows/test-next.yml
@@ -0,0 +1,90 @@
1---
2name: Tests Debian:Testing and Fedora:Rawhide
3
4on:
5 workflow_dispatch:
6 inputs:
7 debug_enabled:
8 type: boolean
9 description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
10 required: false
11 default: false
12 push:
13 branches-ignore:
14 - '*'
15 schedule:
16 # Run every week on Monday at 9:00 AM (UTC)
17 - cron: '0 9 * * 1'
18
19jobs:
20 full-test:
21 name: Running unit and integrationt tests
22 runs-on: ubuntu-latest
23 strategy:
24 fail-fast: false
25 matrix:
26 distro:
27 - 'debian:testing'
28 include:
29 - distro: 'debian:testing'
30 prepare: .github/prepare_debian.sh
31 steps:
32 - name: Git clone repository
33 uses: actions/checkout@v5
34 - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
35 uses: mxschmitt/action-tmate@v3
36 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
37 - name: Run the tests on ${{ matrix.distro }}
38 run: |
39 docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
40 docker run \
41 -e NPTEST_ACCEPTDEFAULT=1 \
42 -e NPTEST_CACHE="/src/.github/NPTest.cache" \
43 -w /src -v ${PWD}:/src \
44 --tmpfs /media/ramdisk1 \
45 -v /var/run/utmp:/var/run/utmp \
46 --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
47 ${{ matrix.distro }} \
48 /bin/sh -c '${{ matrix.prepare }} && \
49 tools/setup && \
50 ./configure --enable-libtap && \
51 make && \
52 make test && \
53 make dist && \
54 tar zxf monitoring-plugins-*.tar.gz && \
55 cd monitoring-plugins-*/ && \
56 ./configure && \
57 make'
58 docker container prune -f
59 docker volume prune -f
60
61 build-test:
62 name: Running rpm build test on ${{ matrix.distro }}
63 runs-on: ubuntu-latest
64 strategy:
65 fail-fast: false
66 matrix:
67 include:
68 - {"distro": "fedora:rawhide", "build": ".github/mock.sh"}
69 steps:
70 - name: Git clone repository
71 uses: actions/checkout@v5
72 - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
73 uses: mxschmitt/action-tmate@v3
74 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
75 - name: Run the tests on ${{ matrix.distro }}
76 run: |
77 docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
78 docker run \
79 --privileged=true \
80 -e NPTEST_ACCEPTDEFAULT=1 \
81 -e NPTEST_CACHE="/src/.github/NPTest.cache" \
82 -w /src -v ${PWD}:/src \
83 --tmpfs /media/ramdisk1 \
84 -v /var/run/utmp:/var/run/utmp \
85 --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
86 ${{ matrix.distro }} \
87 /bin/sh -c '${{ matrix.build }} && \
88 ls -la'
89 docker container prune -f
90 docker volume prune -f