diff options
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r-- | .github/workflows/test.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..512d28e6 --- /dev/null +++ b/.github/workflows/test.yml | |||
@@ -0,0 +1,46 @@ | |||
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 | --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 | ||