diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/codeql-analysis.yml | 4 | ||||
-rw-r--r-- | .github/workflows/spellcheck.yml | 27 | ||||
-rw-r--r-- | .github/workflows/test-next.yml | 78 | ||||
-rw-r--r-- | .github/workflows/test.yml | 90 |
4 files changed, 149 insertions, 50 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0317c8c0..c402e0cf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml | |||
@@ -44,7 +44,7 @@ jobs: | |||
44 | 44 | ||
45 | # Initializes the CodeQL tools for scanning. | 45 | # Initializes the CodeQL tools for scanning. |
46 | - name: Initialize CodeQL | 46 | - name: Initialize CodeQL |
47 | uses: github/codeql-action/init@v2 | 47 | uses: github/codeql-action/init@v3 |
48 | with: | 48 | with: |
49 | languages: ${{ matrix.language }} | 49 | languages: ${{ matrix.language }} |
50 | # If you wish to specify custom queries, you can do so here or in a config file. | 50 | # If you wish to specify custom queries, you can do so here or in a config file. |
@@ -70,4 +70,4 @@ jobs: | |||
70 | make | 70 | make |
71 | 71 | ||
72 | - name: Perform CodeQL Analysis | 72 | - name: Perform CodeQL Analysis |
73 | uses: github/codeql-action/analyze@v2 | 73 | uses: github/codeql-action/analyze@v3 |
diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 00000000..72f7c7eb --- /dev/null +++ b/.github/workflows/spellcheck.yml | |||
@@ -0,0 +1,27 @@ | |||
1 | --- | ||
2 | name: Spellcheck | ||
3 | |||
4 | on: | ||
5 | # Run for pushes on any branch | ||
6 | push: | ||
7 | branches: | ||
8 | - '*' | ||
9 | # Run for any PRs | ||
10 | pull_request: | ||
11 | |||
12 | jobs: | ||
13 | codespell: | ||
14 | name: codespell | ||
15 | strategy: | ||
16 | fail-fast: false | ||
17 | runs-on: ubuntu-latest | ||
18 | steps: | ||
19 | - name: Checkout | ||
20 | uses: actions/checkout@v4 | ||
21 | - name: Codespell | ||
22 | uses: codespell-project/actions-codespell@v2 | ||
23 | with: | ||
24 | skip: "./.git,./.gitignore,./ABOUT-NLS,./gl,./tools/squid.conf,./build-aux/ltmain.sh,THANKS.in" | ||
25 | ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners,esponse,slac | ||
26 | check_filenames: true | ||
27 | check_hidden: true | ||
diff --git a/.github/workflows/test-next.yml b/.github/workflows/test-next.yml new file mode 100644 index 00000000..81240759 --- /dev/null +++ b/.github/workflows/test-next.yml | |||
@@ -0,0 +1,78 @@ | |||
1 | --- | ||
2 | name: Tests Debian:Testing and Fedora:Rawhide | ||
3 | |||
4 | on: | ||
5 | workflow_dispatch: {} | ||
6 | push: | ||
7 | branches-ignore: | ||
8 | - '*' | ||
9 | schedule: | ||
10 | # Run every week on Monday at 9:00 AM (UTC) | ||
11 | - cron: '0 9 * * 1' | ||
12 | |||
13 | jobs: | ||
14 | full-test: | ||
15 | name: Running unit and integrationt tests | ||
16 | runs-on: ubuntu-latest | ||
17 | strategy: | ||
18 | fail-fast: false | ||
19 | matrix: | ||
20 | distro: | ||
21 | - 'debian:testing' | ||
22 | include: | ||
23 | - distro: 'debian:testing' | ||
24 | prepare: .github/prepare_debian.sh | ||
25 | steps: | ||
26 | - name: Git clone repository | ||
27 | uses: actions/checkout@v4 | ||
28 | - name: Run the tests on ${{ matrix.distro }} | ||
29 | run: | | ||
30 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
31 | docker run \ | ||
32 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
33 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
34 | -w /src -v ${PWD}:/src \ | ||
35 | --tmpfs /media/ramdisk1 \ | ||
36 | -v /var/run/utmp:/var/run/utmp \ | ||
37 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
38 | ${{ matrix.distro }} \ | ||
39 | /bin/sh -c '${{ matrix.prepare }} && \ | ||
40 | tools/setup && \ | ||
41 | ./configure --enable-libtap --with-ipv6=no && \ | ||
42 | make && \ | ||
43 | make test && \ | ||
44 | make dist && \ | ||
45 | tar zxf monitoring-plugins-*.tar.gz && \ | ||
46 | cd monitoring-plugins-*/ && \ | ||
47 | ./configure && \ | ||
48 | make' | ||
49 | docker container prune -f | ||
50 | docker volume prune -f | ||
51 | |||
52 | build-test: | ||
53 | name: Running rpm build test on ${{ matrix.distro }} | ||
54 | runs-on: ubuntu-latest | ||
55 | strategy: | ||
56 | fail-fast: false | ||
57 | matrix: | ||
58 | include: | ||
59 | - {"distro": "fedora:rawhide", "build": ".github/mock.sh"} | ||
60 | steps: | ||
61 | - name: Git clone repository | ||
62 | uses: actions/checkout@v4 | ||
63 | - name: Run the tests on ${{ matrix.distro }} | ||
64 | run: | | ||
65 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
66 | docker run \ | ||
67 | --privileged=true \ | ||
68 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
69 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
70 | -w /src -v ${PWD}:/src \ | ||
71 | --tmpfs /media/ramdisk1 \ | ||
72 | -v /var/run/utmp:/var/run/utmp \ | ||
73 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
74 | ${{ matrix.distro }} \ | ||
75 | /bin/sh -c '${{ matrix.build }} && \ | ||
76 | ls -la' | ||
77 | docker container prune -f | ||
78 | docker volume prune -f | ||
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77b09f43..77ca6585 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -1,65 +1,27 @@ | |||
1 | --- | 1 | --- |
2 | name: Test | 2 | name: Tests |
3 | 3 | ||
4 | on: | 4 | on: |
5 | push: | 5 | push: |
6 | branches: | 6 | branches: |
7 | - '*' | 7 | - '*' |
8 | # Run test for any PRs | ||
9 | pull_request: | 8 | pull_request: |
10 | 9 | ||
11 | jobs: | 10 | jobs: |
12 | codespell: | 11 | full-test: |
13 | name: codespell | 12 | name: Running unit and integrationt tests |
14 | strategy: | ||
15 | fail-fast: false | ||
16 | runs-on: ubuntu-latest | 13 | runs-on: ubuntu-latest |
17 | steps: | ||
18 | - name: Checkout | ||
19 | uses: actions/checkout@v4 | ||
20 | - name: Codespell | ||
21 | uses: codespell-project/actions-codespell@v2 | ||
22 | with: | ||
23 | skip: "./.git,./.gitignore,./ABOUT-NLS,*.po,./gl,./po,./tools/squid.conf,./build-aux/ltmain.sh" | ||
24 | ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners | ||
25 | check_filenames: true | ||
26 | check_hidden: true | ||
27 | # super-linter: | ||
28 | # name: super-linter | ||
29 | # strategy: | ||
30 | # fail-fast: false | ||
31 | # runs-on: ubuntu-latest | ||
32 | # steps: | ||
33 | # - name: Checkout | ||
34 | # uses: actions/checkout@v4 | ||
35 | # - name: Lint Code Base | ||
36 | # uses: github/super-linter@v5.0.0 | ||
37 | # env: | ||
38 | # DEFAULT_BRANCH: master | ||
39 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
40 | # macos: | ||
41 | # ... | ||
42 | linux: | ||
43 | needs: | ||
44 | - codespell | ||
45 | # - super-linter | ||
46 | runs-on: ubuntu-latest | ||
47 | name: Running tests on ${{ matrix.distro }} | ||
48 | strategy: | 14 | strategy: |
49 | fail-fast: false | 15 | fail-fast: false |
50 | matrix: | 16 | matrix: |
51 | distro: | 17 | distro: |
52 | - 'debian:testing' | 18 | - 'debian:stable' |
53 | #... | ||
54 | include: | 19 | include: |
55 | - distro: 'debian:testing' | 20 | - distro: 'debian:stable' |
56 | prepare: .github/prepare_debian.sh | 21 | prepare: .github/prepare_debian.sh |
57 | #... | ||
58 | steps: | 22 | steps: |
59 | - name: Git clone repository | 23 | - name: Git clone repository |
60 | uses: actions/checkout@v4 | 24 | uses: actions/checkout@v4 |
61 | #- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
62 | # uses: mxschmitt/action-tmate@v3 | ||
63 | - name: Run the tests on ${{ matrix.distro }} | 25 | - name: Run the tests on ${{ matrix.distro }} |
64 | run: | | 26 | run: | |
65 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | 27 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol |
@@ -74,11 +36,43 @@ jobs: | |||
74 | /bin/sh -c '${{ matrix.prepare }} && \ | 36 | /bin/sh -c '${{ matrix.prepare }} && \ |
75 | tools/setup && \ | 37 | tools/setup && \ |
76 | ./configure --enable-libtap --with-ipv6=no && \ | 38 | ./configure --enable-libtap --with-ipv6=no && \ |
77 | set -x && \ | ||
78 | tmp_dir=$(mktemp -d -t test-XXXX) && cp -a po/ $tmp_dir/ && \ | ||
79 | cd po && make update-po && cd .. && \ | ||
80 | diff -Nur $tmp_dir/po/*.po po/*.po | tee -a /tmp/po.diff && diff -Nur $tmp_dir/po/*.pot po/*.pot | tee -a /tmp/po.diff && if [ $(wc -l /tmp/po.diff | cut -f 1 -d" ") -gt 0 ]; then echo "Error: Translations needs to be updated with make update-po!" && exit 1; fi && \ | ||
81 | make && \ | 39 | make && \ |
82 | make test' | 40 | make test && \ |
41 | make dist && \ | ||
42 | tar zxf monitoring-plugins-*.tar.gz && \ | ||
43 | cd monitoring-plugins-*/ && \ | ||
44 | ./configure && \ | ||
45 | make' | ||
46 | docker container prune -f | ||
47 | docker volume prune -f | ||
48 | |||
49 | build-test: | ||
50 | name: Running rpm build test on ${{ matrix.distro }} | ||
51 | runs-on: ubuntu-latest | ||
52 | strategy: | ||
53 | fail-fast: false | ||
54 | matrix: | ||
55 | include: | ||
56 | - {"distro": "fedora:latest", "build": ".github/mock.sh"} | ||
57 | - {"distro": "rockylinux:8", "build": ".github/mock.sh"} | ||
58 | - {"distro": "almalinux:9", "build": ".github/mock.sh"} | ||
59 | # - {"distro": "oraclelinux:9", "build": ".github/mock.sh"} | ||
60 | steps: | ||
61 | - name: Git clone repository | ||
62 | uses: actions/checkout@v4 | ||
63 | - name: Run the tests on ${{ matrix.distro }} | ||
64 | run: | | ||
65 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
66 | docker run \ | ||
67 | --privileged=true \ | ||
68 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
69 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
70 | -w /src -v ${PWD}:/src \ | ||
71 | --tmpfs /media/ramdisk1 \ | ||
72 | -v /var/run/utmp:/var/run/utmp \ | ||
73 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
74 | ${{ matrix.distro }} \ | ||
75 | /bin/sh -c '${{ matrix.build }} && \ | ||
76 | ls -la' | ||
83 | docker container prune -f | 77 | docker container prune -f |
84 | docker volume prune -f | 78 | docker volume prune -f |