summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
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..0f93930
--- /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@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