diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2021-12-02 16:42:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 16:42:05 +0100 |
commit | 911e44045d7291f5ede22739fd176ef55dd3de4a (patch) | |
tree | cf36b95a4a964b03d6ecf75770ced2cb3a2ac3a9 /.github/workflows/test.yml | |
parent | 8294af907bd8482a86df749f562b7ec09e3faeed (diff) | |
parent | ed7cdf82a42f16532801ea4f118870ce9a130fcf (diff) | |
download | monitoring-plugins-911e440.tar.gz |
Merge branch 'master' into fix/shellcheck
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r-- | .github/workflows/test.yml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..0f93930a --- /dev/null +++ b/.github/workflows/test.yml | |||
@@ -0,0 +1,47 @@ | |||
1 | name: Test | ||
2 | |||
3 | on: | ||
4 | push: | ||
5 | branches: | ||
6 | - '*' | ||
7 | pull_request: | ||
8 | |||
9 | jobs: | ||
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 | -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 | ||