diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/codeql-analysis.yml | 24 | ||||
-rw-r--r-- | .github/workflows/spellcheck.yml | 3 | ||||
-rw-r--r-- | .github/workflows/test-next.yml | 90 | ||||
-rw-r--r-- | .github/workflows/test.yml | 20 |
4 files changed, 126 insertions, 11 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c402e0cf..8f191037 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml | |||
@@ -13,6 +13,7 @@ | |||
13 | name: "CodeQL" | 13 | name: "CodeQL" |
14 | 14 | ||
15 | on: | 15 | on: |
16 | workflow_dispatch: {} | ||
16 | push: | 17 | push: |
17 | branches: [master] | 18 | branches: [master] |
18 | pull_request: | 19 | pull_request: |
@@ -40,11 +41,11 @@ jobs: | |||
40 | 41 | ||
41 | steps: | 42 | steps: |
42 | - name: Checkout repository | 43 | - name: Checkout repository |
43 | uses: actions/checkout@v4 | 44 | uses: actions/checkout@v5 |
44 | 45 | ||
45 | # Initializes the CodeQL tools for scanning. | 46 | # Initializes the CodeQL tools for scanning. |
46 | - name: Initialize CodeQL | 47 | - name: Initialize CodeQL |
47 | uses: github/codeql-action/init@v3 | 48 | uses: github/codeql-action/init@v4 |
48 | with: | 49 | with: |
49 | languages: ${{ matrix.language }} | 50 | languages: ${{ matrix.language }} |
50 | # If you wish to specify custom queries, you can do so here or in a config file. | 51 | # If you wish to specify custom queries, you can do so here or in a config file. |
@@ -56,9 +57,20 @@ jobs: | |||
56 | run: | | 57 | run: | |
57 | sudo apt update | 58 | sudo apt update |
58 | sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential | 59 | sudo apt-get install -y --no-install-recommends m4 gettext automake autoconf make build-essential |
59 | sudo apt-get install -y --no-install-recommends perl autotools-dev libdbi-dev libldap2-dev libpq-dev \ | 60 | sudo apt-get install -y --no-install-recommends perl \ |
60 | libmysqlclient-dev libradcli-dev libkrb5-dev libdbi0-dev \ | 61 | autotools-dev \ |
61 | libdbd-sqlite3 libssl-dev libcurl4-openssl-dev liburiparser-dev | 62 | libdbi-dev \ |
63 | libldap2-dev \ | ||
64 | libpq-dev \ | ||
65 | libmysqlclient-dev \ | ||
66 | libradcli-dev \ | ||
67 | libkrb5-dev \ | ||
68 | libdbi0-dev \ | ||
69 | libdbd-sqlite3 \ | ||
70 | libssl-dev \ | ||
71 | libcurl4-openssl-dev \ | ||
72 | liburiparser-dev \ | ||
73 | libsnmp-dev | ||
62 | 74 | ||
63 | - name: Configure build | 75 | - name: Configure build |
64 | run: | | 76 | run: | |
@@ -70,4 +82,4 @@ jobs: | |||
70 | make | 82 | make |
71 | 83 | ||
72 | - name: Perform CodeQL Analysis | 84 | - name: Perform CodeQL Analysis |
73 | uses: github/codeql-action/analyze@v3 | 85 | uses: github/codeql-action/analyze@v4 |
diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 72f7c7eb..14b82781 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml | |||
@@ -2,6 +2,7 @@ | |||
2 | name: Spellcheck | 2 | name: Spellcheck |
3 | 3 | ||
4 | on: | 4 | on: |
5 | workflow_dispatch: {} | ||
5 | # Run for pushes on any branch | 6 | # Run for pushes on any branch |
6 | push: | 7 | push: |
7 | branches: | 8 | branches: |
@@ -17,7 +18,7 @@ jobs: | |||
17 | runs-on: ubuntu-latest | 18 | runs-on: ubuntu-latest |
18 | steps: | 19 | steps: |
19 | - name: Checkout | 20 | - name: Checkout |
20 | uses: actions/checkout@v4 | 21 | uses: actions/checkout@v5 |
21 | - name: Codespell | 22 | - name: Codespell |
22 | uses: codespell-project/actions-codespell@v2 | 23 | uses: codespell-project/actions-codespell@v2 |
23 | with: | 24 | with: |
diff --git a/.github/workflows/test-next.yml b/.github/workflows/test-next.yml new file mode 100644 index 00000000..0e69c251 --- /dev/null +++ b/.github/workflows/test-next.yml | |||
@@ -0,0 +1,90 @@ | |||
1 | --- | ||
2 | name: Tests Debian:Testing and Fedora:Rawhide | ||
3 | |||
4 | on: | ||
5 | workflow_dispatch: | ||
6 | inputs: | ||
7 | debug_enabled: | ||
8 | type: boolean | ||
9 | description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
10 | required: false | ||
11 | default: false | ||
12 | push: | ||
13 | branches-ignore: | ||
14 | - '*' | ||
15 | schedule: | ||
16 | # Run every week on Monday at 9:00 AM (UTC) | ||
17 | - cron: '0 9 * * 1' | ||
18 | |||
19 | jobs: | ||
20 | full-test: | ||
21 | name: Running unit and integrationt tests | ||
22 | runs-on: ubuntu-latest | ||
23 | strategy: | ||
24 | fail-fast: false | ||
25 | matrix: | ||
26 | distro: | ||
27 | - 'debian:testing' | ||
28 | include: | ||
29 | - distro: 'debian:testing' | ||
30 | prepare: .github/prepare_debian.sh | ||
31 | steps: | ||
32 | - name: Git clone repository | ||
33 | uses: actions/checkout@v5 | ||
34 | - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
35 | uses: mxschmitt/action-tmate@v3 | ||
36 | if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
37 | - name: Run the tests on ${{ matrix.distro }} | ||
38 | run: | | ||
39 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
40 | docker run \ | ||
41 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
42 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
43 | -w /src -v ${PWD}:/src \ | ||
44 | --tmpfs /media/ramdisk1 \ | ||
45 | -v /var/run/utmp:/var/run/utmp \ | ||
46 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
47 | ${{ matrix.distro }} \ | ||
48 | /bin/sh -c '${{ matrix.prepare }} && \ | ||
49 | tools/setup && \ | ||
50 | ./configure --enable-libtap && \ | ||
51 | make && \ | ||
52 | make test && \ | ||
53 | make dist && \ | ||
54 | tar zxf monitoring-plugins-*.tar.gz && \ | ||
55 | cd monitoring-plugins-*/ && \ | ||
56 | ./configure && \ | ||
57 | make' | ||
58 | docker container prune -f | ||
59 | docker volume prune -f | ||
60 | |||
61 | build-test: | ||
62 | name: Running rpm build test on ${{ matrix.distro }} | ||
63 | runs-on: ubuntu-latest | ||
64 | strategy: | ||
65 | fail-fast: false | ||
66 | matrix: | ||
67 | include: | ||
68 | - {"distro": "fedora:rawhide", "build": ".github/mock.sh"} | ||
69 | steps: | ||
70 | - name: Git clone repository | ||
71 | uses: actions/checkout@v5 | ||
72 | - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
73 | uses: mxschmitt/action-tmate@v3 | ||
74 | if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
75 | - name: Run the tests on ${{ matrix.distro }} | ||
76 | run: | | ||
77 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | ||
78 | docker run \ | ||
79 | --privileged=true \ | ||
80 | -e NPTEST_ACCEPTDEFAULT=1 \ | ||
81 | -e NPTEST_CACHE="/src/.github/NPTest.cache" \ | ||
82 | -w /src -v ${PWD}:/src \ | ||
83 | --tmpfs /media/ramdisk1 \ | ||
84 | -v /var/run/utmp:/var/run/utmp \ | ||
85 | --mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \ | ||
86 | ${{ matrix.distro }} \ | ||
87 | /bin/sh -c '${{ matrix.build }} && \ | ||
88 | ls -la' | ||
89 | docker container prune -f | ||
90 | docker volume prune -f | ||
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33220d6d..1ac8aaf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -2,6 +2,13 @@ | |||
2 | name: Tests | 2 | name: Tests |
3 | 3 | ||
4 | on: | 4 | on: |
5 | workflow_dispatch: | ||
6 | inputs: | ||
7 | debug_enabled: | ||
8 | type: boolean | ||
9 | description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
10 | required: false | ||
11 | default: false | ||
5 | push: | 12 | push: |
6 | branches: | 13 | branches: |
7 | - '*' | 14 | - '*' |
@@ -21,7 +28,10 @@ jobs: | |||
21 | prepare: .github/prepare_debian.sh | 28 | prepare: .github/prepare_debian.sh |
22 | steps: | 29 | steps: |
23 | - name: Git clone repository | 30 | - name: Git clone repository |
24 | uses: actions/checkout@v4 | 31 | uses: actions/checkout@v5 |
32 | - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
33 | uses: mxschmitt/action-tmate@v3 | ||
34 | if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
25 | - name: Run the tests on ${{ matrix.distro }} | 35 | - name: Run the tests on ${{ matrix.distro }} |
26 | run: | | 36 | run: | |
27 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | 37 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol |
@@ -35,7 +45,7 @@ jobs: | |||
35 | ${{ matrix.distro }} \ | 45 | ${{ matrix.distro }} \ |
36 | /bin/sh -c '${{ matrix.prepare }} && \ | 46 | /bin/sh -c '${{ matrix.prepare }} && \ |
37 | tools/setup && \ | 47 | tools/setup && \ |
38 | ./configure --enable-libtap --with-ipv6=no && \ | 48 | ./configure --enable-libtap && \ |
39 | make && \ | 49 | make && \ |
40 | make test && \ | 50 | make test && \ |
41 | make dist && \ | 51 | make dist && \ |
@@ -54,13 +64,15 @@ jobs: | |||
54 | matrix: | 64 | matrix: |
55 | include: | 65 | include: |
56 | - {"distro": "fedora:latest", "build": ".github/mock.sh"} | 66 | - {"distro": "fedora:latest", "build": ".github/mock.sh"} |
57 | - {"distro": "fedora:rawhide", "build": ".github/mock.sh"} | ||
58 | - {"distro": "rockylinux:8", "build": ".github/mock.sh"} | 67 | - {"distro": "rockylinux:8", "build": ".github/mock.sh"} |
59 | - {"distro": "almalinux:9", "build": ".github/mock.sh"} | 68 | - {"distro": "almalinux:9", "build": ".github/mock.sh"} |
60 | # - {"distro": "oraclelinux:9", "build": ".github/mock.sh"} | 69 | # - {"distro": "oraclelinux:9", "build": ".github/mock.sh"} |
61 | steps: | 70 | steps: |
62 | - name: Git clone repository | 71 | - name: Git clone repository |
63 | uses: actions/checkout@v4 | 72 | uses: actions/checkout@v5 |
73 | - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | ||
74 | uses: mxschmitt/action-tmate@v3 | ||
75 | if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
64 | - name: Run the tests on ${{ matrix.distro }} | 76 | - name: Run the tests on ${{ matrix.distro }} |
65 | run: | | 77 | run: | |
66 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | 78 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol |