diff options
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r-- | .github/workflows/test.yml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..4c3497d0 --- /dev/null +++ b/.github/workflows/test.yml | |||
@@ -0,0 +1,77 @@ | |||
1 | name: Test | ||
2 | |||
3 | on: | ||
4 | push: | ||
5 | branches: | ||
6 | - '*' | ||
7 | pull_request: | ||
8 | |||
9 | jobs: | ||
10 | # macos: | ||
11 | # name: Running tests on ${{ matrix.os }} | ||
12 | # strategy: | ||
13 | # fail-fast: false | ||
14 | # matrix: | ||
15 | # os: | ||
16 | # - macos-10.15 | ||
17 | # runs-on: ${{ matrix.os }} | ||
18 | # steps: | ||
19 | # | ||
20 | # - name: Git clone repository | ||
21 | # uses: actions/checkout@v2 | ||
22 | # #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
23 | # # uses: mxschmitt/action-tmate@v3 | ||
24 | # - name: Prepare machine | ||
25 | # run: | | ||
26 | # brew install automake | ||
27 | # - name: Run the tests | ||
28 | # run: | | ||
29 | # tools/setup \ | ||
30 | # && ./configure --enable-libtap \ | ||
31 | # && make \ | ||
32 | # && make test | ||
33 | |||
34 | linux: | ||
35 | runs-on: ubuntu-latest | ||
36 | name: Running tests on ${{ matrix.distro }} | ||
37 | strategy: | ||
38 | fail-fast: false | ||
39 | matrix: | ||
40 | distro: | ||
41 | #- 'debian:10' | ||
42 | - 'debian:testing' | ||
43 | #- 'ubuntu:20.10' | ||
44 | #- 'centos:7' | ||
45 | #- 'centos:8' | ||
46 | include: | ||
47 | #- distro: 'debian:10' | ||
48 | # prepare: .github/prepare_debian.sh | ||
49 | - distro: 'debian:testing' | ||
50 | prepare: .github/prepare_debian.sh | ||
51 | #- distro: 'ubuntu:20.10' | ||
52 | # prepare: .github/prepare_debian.sh | ||
53 | #- distro: 'centos:7' | ||
54 | # prepare: .github/prepare_centos.sh | ||
55 | #- distro: 'centos:8' | ||
56 | # prepare: .github/prepare_centos.sh | ||
57 | steps: | ||
58 | - name: Git clone repository | ||
59 | uses: actions/checkout@v2 | ||
60 | #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
61 | # uses: mxschmitt/action-tmate@v3 | ||
62 | - name: Run the tests on ${{ matrix.distro }} | ||
63 | run: | | ||
64 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
65 | docker run \ | ||
66 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
67 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
68 | -w /src -v ${PWD}:/src \ | ||
69 | --tmpfs /media/ramdisk1 \ | ||
70 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
71 | ${{ matrix.distro }} \ | ||
72 | /bin/sh -c '${{ matrix.prepare }} && \ | ||
73 | tools/setup && \ | ||
74 | ./configure --enable-libtap && \ | ||
75 | make && \ | ||
76 | make test' | ||
77 | docker volume rm tmp-vol | ||