diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/NPTest.cache | 11 | ||||
| -rw-r--r-- | .github/monitoring-plugins.spec | 61 | ||||
| -rw-r--r-- | .github/os_detect.sh | 10 | ||||
| -rwxr-xr-x | .github/prepare_debian.sh | 28 | ||||
| -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 | 20 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 19 |
8 files changed, 101 insertions, 75 deletions
diff --git a/.github/NPTest.cache b/.github/NPTest.cache index d488d1b9..3f6d4da6 100644 --- a/.github/NPTest.cache +++ b/.github/NPTest.cache | |||
| @@ -19,6 +19,13 @@ | |||
| 19 | 'NP_HOST_TCP_HPJD' => '', | 19 | 'NP_HOST_TCP_HPJD' => '', |
| 20 | 'NP_HOST_TCP_HTTP2' => 'test.monitoring-plugins.org', | 20 | 'NP_HOST_TCP_HTTP2' => 'test.monitoring-plugins.org', |
| 21 | 'NP_HOST_TCP_HTTP' => 'localhost', | 21 | 'NP_HOST_TCP_HTTP' => 'localhost', |
| 22 | 'NP_HOST_TCP_HTTP_IPV4' => '127.0.0.1', | ||
| 23 | 'NP_HOST_TCP_HTTP_IPV4_CIDR_1' => '127.0.0.0/28', | ||
| 24 | 'NP_HOST_TCP_HTTP_IPV4_CIDR_2' => '127.0.0.1/32', | ||
| 25 | 'NP_HOST_TCP_HTTP_IPV6' => '::1', | ||
| 26 | 'NP_HOST_TCP_HTTP_IPV6_CIDR_1' => '0000:0000:0000::0000:0000:0000/16', | ||
| 27 | 'NP_HOST_TCP_HTTP_IPV6_CIDR_2' => '::1234:5678/16', | ||
| 28 | 'NP_HOST_TCP_HTTP_SUBDOMAIN' => 'subdomain1.localhost', | ||
| 22 | 'NP_HOST_TCP_IMAP' => 'imap.web.de', | 29 | 'NP_HOST_TCP_IMAP' => 'imap.web.de', |
| 23 | 'NP_HOST_TCP_JABBER' => 'jabber.org', | 30 | 'NP_HOST_TCP_JABBER' => 'jabber.org', |
| 24 | 'NP_HOST_TCP_LDAP' => 'localhost', | 31 | 'NP_HOST_TCP_LDAP' => 'localhost', |
| @@ -38,8 +45,8 @@ | |||
| 38 | 'NP_MYSQL_LOGIN_DETAILS' => '-u root -d test', | 45 | 'NP_MYSQL_LOGIN_DETAILS' => '-u root -d test', |
| 39 | 'NP_MYSQL_SERVER' => 'localhost', | 46 | 'NP_MYSQL_SERVER' => 'localhost', |
| 40 | 'NP_MYSQL_SOCKET' => '/var/run/mysqld/mysqld.sock', | 47 | 'NP_MYSQL_SOCKET' => '/var/run/mysqld/mysqld.sock', |
| 41 | 'NP_MYSQL_WITH_SLAVE' => '', | 48 | 'NP_MYSQL_WITH_REPLICA' => '', |
| 42 | 'NP_MYSQL_WITH_SLAVE_LOGIN' => '', | 49 | 'NP_MYSQL_WITH_REPLICA_LOGIN' => '', |
| 43 | 'NP_NO_NTP_SERVICE' => 'localhost', | 50 | 'NP_NO_NTP_SERVICE' => 'localhost', |
| 44 | 'NP_PORT_TCP_PROXY' => '3128', | 51 | 'NP_PORT_TCP_PROXY' => '3128', |
| 45 | 'NP_SMB_SHARE' => '', | 52 | 'NP_SMB_SHARE' => '', |
diff --git a/.github/monitoring-plugins.spec b/.github/monitoring-plugins.spec index 5cae3e59..e3465227 100644 --- a/.github/monitoring-plugins.spec +++ b/.github/monitoring-plugins.spec | |||
| @@ -88,6 +88,9 @@ BuildRequires: postgresql-devel | |||
| 88 | # check_radius | 88 | # check_radius |
| 89 | BuildRequires: radcli-devel | 89 | BuildRequires: radcli-devel |
| 90 | 90 | ||
| 91 | # check_snmp | ||
| 92 | BuildRequires: net-snmp-devel | ||
| 93 | |||
| 91 | %description | 94 | %description |
| 92 | Common files for Monitoring Plugins | 95 | Common files for Monitoring Plugins |
| 93 | 96 | ||
| @@ -191,9 +194,7 @@ Requires: %{name}-nt | |||
| 191 | Requires: %{name}-ntp | 194 | Requires: %{name}-ntp |
| 192 | Requires: %{name}-ntp_peer | 195 | Requires: %{name}-ntp_peer |
| 193 | Requires: %{name}-ntp_time | 196 | Requires: %{name}-ntp_time |
| 194 | Requires: %{name}-nwstat | ||
| 195 | Requires: %{name}-oracle | 197 | Requires: %{name}-oracle |
| 196 | Requires: %{name}-overcr | ||
| 197 | Requires: %{name}-pgsql | 198 | Requires: %{name}-pgsql |
| 198 | Requires: %{name}-ping | 199 | Requires: %{name}-ping |
| 199 | Requires: %{name}-procs | 200 | Requires: %{name}-procs |
| @@ -651,32 +652,6 @@ Provides check_nagios of the Monitoring Plugins. | |||
| 651 | 652 | ||
| 652 | 653 | ||
| 653 | 654 | ||
| 654 | # check_nt | ||
| 655 | %package nt | ||
| 656 | Summary: Monitoring Plugins - check_nt | ||
| 657 | Requires: %{name} = %{version}-%{release} | ||
| 658 | |||
| 659 | %description nt | ||
| 660 | Provides check_nt of the Monitoring Plugins. | ||
| 661 | |||
| 662 | %files nt | ||
| 663 | %{plugindir}/check_nt | ||
| 664 | |||
| 665 | |||
| 666 | |||
| 667 | # check_ntp | ||
| 668 | %package ntp | ||
| 669 | Summary: Monitoring Plugins - check_ntp | ||
| 670 | Requires: %{name} = %{version}-%{release} | ||
| 671 | |||
| 672 | %description ntp | ||
| 673 | Provides check_ntp of the Monitoring Plugins. | ||
| 674 | |||
| 675 | %files ntp | ||
| 676 | %{plugindir}/check_ntp | ||
| 677 | |||
| 678 | |||
| 679 | |||
| 680 | # check_ntp_peer | 655 | # check_ntp_peer |
| 681 | %package ntp_peer | 656 | %package ntp_peer |
| 682 | Summary: Monitoring Plugins - check_ntp_peer | 657 | Summary: Monitoring Plugins - check_ntp_peer |
| @@ -703,19 +678,6 @@ Provides check_ntp_time of the Monitoring Plugins. | |||
| 703 | 678 | ||
| 704 | 679 | ||
| 705 | 680 | ||
| 706 | # check_nwstat | ||
| 707 | %package nwstat | ||
| 708 | Summary: Monitoring Plugins - check_nwstat | ||
| 709 | Requires: %{name} = %{version}-%{release} | ||
| 710 | |||
| 711 | %description nwstat | ||
| 712 | Provides check_nwstat of the Monitoring Plugins. | ||
| 713 | |||
| 714 | %files nwstat | ||
| 715 | %{plugindir}/check_nwstat | ||
| 716 | |||
| 717 | |||
| 718 | |||
| 719 | # check_oracle | 681 | # check_oracle |
| 720 | %package oracle | 682 | %package oracle |
| 721 | Summary: Monitoring Plugins - check_oracle | 683 | Summary: Monitoring Plugins - check_oracle |
| @@ -729,19 +691,6 @@ Provides check_oracle of the Monitoring Plugins. | |||
| 729 | 691 | ||
| 730 | 692 | ||
| 731 | 693 | ||
| 732 | # check_overcr | ||
| 733 | %package overcr | ||
| 734 | Summary: Monitoring Plugins - check_overcr | ||
| 735 | Requires: %{name} = %{version}-%{release} | ||
| 736 | |||
| 737 | %description overcr | ||
| 738 | Provides check_overcr of the Monitoring Plugins. | ||
| 739 | |||
| 740 | %files overcr | ||
| 741 | %{plugindir}/check_overcr | ||
| 742 | |||
| 743 | |||
| 744 | |||
| 745 | # check_pgsql | 694 | # check_pgsql |
| 746 | %package pgsql | 695 | %package pgsql |
| 747 | Summary: Monitoring Plugins - check_pgsql | 696 | Summary: Monitoring Plugins - check_pgsql |
| @@ -973,3 +922,7 @@ Provides check_wave of the Monitoring Plugins. | |||
| 973 | 922 | ||
| 974 | %files wave | 923 | %files wave |
| 975 | %{plugindir}/check_wave | 924 | %{plugindir}/check_wave |
| 925 | |||
| 926 | %changelog | ||
| 927 | * Wed Oct 20 2011 John Doe <jdoe@example.com> 0.8.18.1-0.1 | ||
| 928 | - Initial RPM release | ||
diff --git a/.github/os_detect.sh b/.github/os_detect.sh index ee9c145d..3c5956de 100644 --- a/.github/os_detect.sh +++ b/.github/os_detect.sh | |||
| @@ -1,10 +1,17 @@ | |||
| 1 | #!/bin/sh -e | 1 | #!/bin/sh -e |
| 2 | |||
| 3 | . /etc/os-release | ||
| 4 | |||
| 2 | # workaround for really bare-bones Archlinux containers: | 5 | # workaround for really bare-bones Archlinux containers: |
| 3 | if [ -x "$(command -v pacman)" ]; then | 6 | if [ -x "$(command -v pacman)" ]; then |
| 4 | pacman --noconfirm -Sy | 7 | pacman --noconfirm -Sy |
| 5 | pacman --noconfirm -S grep gawk sed | 8 | pacman --noconfirm -S grep gawk sed |
| 6 | fi | 9 | fi |
| 7 | 10 | ||
| 11 | if [ ${ID} == "fedora" -a ${VERSION_ID} -gt 41 ]; then | ||
| 12 | dnf install -y gawk | ||
| 13 | fi | ||
| 14 | |||
| 8 | os_release_file= | 15 | os_release_file= |
| 9 | if [ -s "/etc/os-release" ]; then | 16 | if [ -s "/etc/os-release" ]; then |
| 10 | os_release_file="/etc/os-release" | 17 | os_release_file="/etc/os-release" |
| @@ -15,4 +22,7 @@ else | |||
| 15 | return 1 | 22 | return 1 |
| 16 | fi | 23 | fi |
| 17 | export distro_id=$(grep '^ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') | 24 | export distro_id=$(grep '^ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') |
| 25 | export version_id=$(grep '^VERSION_ID=' $os_release_file|awk -F = '{print $2}'|sed 's/\"//g') | ||
| 18 | export platform_id=$(grep '^PLATFORM_ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g'| cut -d":" -f2) | 26 | export platform_id=$(grep '^PLATFORM_ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g'| cut -d":" -f2) |
| 27 | # Fedora dropped PLATFORM_ID: https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID?#Drop_PLATFORM_ID | ||
| 28 | if [ -z $platform_id ]; then export platform_id=$(echo ${distro_id:0:1}${version_id}); fi | ||
diff --git a/.github/prepare_debian.sh b/.github/prepare_debian.sh index 3640e500..15c2286c 100755 --- a/.github/prepare_debian.sh +++ b/.github/prepare_debian.sh | |||
| @@ -24,6 +24,7 @@ apt-get -y install perl \ | |||
| 24 | libpq-dev \ | 24 | libpq-dev \ |
| 25 | libradcli-dev \ | 25 | libradcli-dev \ |
| 26 | libnet-snmp-perl \ | 26 | libnet-snmp-perl \ |
| 27 | libsnmp-dev \ | ||
| 27 | procps \ | 28 | procps \ |
| 28 | libdbi0-dev \ | 29 | libdbi0-dev \ |
| 29 | libdbd-sqlite3 \ | 30 | libdbd-sqlite3 \ |
| @@ -59,15 +60,17 @@ apt-get -y install perl \ | |||
| 59 | mariadb-server \ | 60 | mariadb-server \ |
| 60 | mariadb-client \ | 61 | mariadb-client \ |
| 61 | libmariadb-dev \ | 62 | libmariadb-dev \ |
| 63 | libmariadb-dev-compat \ | ||
| 62 | cron \ | 64 | cron \ |
| 63 | iputils-ping \ | 65 | iputils-ping \ |
| 64 | iproute2 | 66 | iproute2 \ |
| 67 | libjson-perl | ||
| 65 | 68 | ||
| 66 | # remove ipv6 interface from hosts | 69 | # remove ipv6 interface from hosts |
| 67 | sed '/^::1/d' /etc/hosts > /tmp/hosts | 70 | # sed '/^::1/d' /etc/hosts > /tmp/hosts |
| 68 | cp -f /tmp/hosts /etc/hosts | 71 | # cp -f /tmp/hosts /etc/hosts |
| 69 | ip addr show | 72 | # ip addr show |
| 70 | cat /etc/hosts | 73 | # cat /etc/hosts |
| 71 | 74 | ||
| 72 | # apache | 75 | # apache |
| 73 | a2enmod ssl | 76 | a2enmod ssl |
| @@ -77,6 +80,19 @@ a2ensite default-ssl | |||
| 77 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem | 80 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem |
| 78 | rm /etc/ssl/private/ssl-cert-snakeoil.key | 81 | rm /etc/ssl/private/ssl-cert-snakeoil.key |
| 79 | openssl req -nodes -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=$(hostname)" | 82 | openssl req -nodes -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=$(hostname)" |
| 83 | # add a subdomain for testing | ||
| 84 | cp tools/subdomain1/subdomain1.conf /etc/apache2/sites-available/ | ||
| 85 | mkdir -p /var/www/subdomain1 | ||
| 86 | cp tools/subdomain1/index.php /var/www/subdomain1/ | ||
| 87 | echo '127.0.0.1 subdomain1.localhost' >> /etc/hosts | ||
| 88 | echo '127.0.0.1 subdomain1.localhost.com' >> /etc/hosts | ||
| 89 | apache2ctl configtest | ||
| 90 | a2ensite subdomain1.conf | ||
| 91 | |||
| 92 | # Make it listen to both IPv4 on IPv6 on localhost | ||
| 93 | sed -i 's/^Listen 80/Listen 0.0.0.0:80\nListen [::1]:80/' /etc/apache2/ports.conf | ||
| 94 | sed -i 's/^[[:space:]]*Listen 443/Listen 0.0.0.0:443\nListen [::1]:443/' /etc/apache2/ports.conf | ||
| 95 | |||
| 80 | service apache2 restart | 96 | service apache2 restart |
| 81 | 97 | ||
| 82 | # squid | 98 | # squid |
| @@ -109,6 +125,8 @@ mkdir -p /var/lib/snmp/mib_indexes | |||
| 109 | sed -e 's/^agentaddress.*/agentaddress 127.0.0.1/' -i /etc/snmp/snmpd.conf | 125 | sed -e 's/^agentaddress.*/agentaddress 127.0.0.1/' -i /etc/snmp/snmpd.conf |
| 110 | service snmpd start | 126 | service snmpd start |
| 111 | 127 | ||
| 128 | sed 's/^mibs ://' -i /etc/snmp/snmp.conf | ||
| 129 | |||
| 112 | # start cron, will be used by check_nagios | 130 | # start cron, will be used by check_nagios |
| 113 | cron | 131 | cron |
| 114 | 132 | ||
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c402e0cf..bd1037f4 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@v6 |
| 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..f19cc920 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@v6 |
| 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 index 81240759..a7e9b9d6 100644 --- a/.github/workflows/test-next.yml +++ b/.github/workflows/test-next.yml | |||
| @@ -2,7 +2,13 @@ | |||
| 2 | name: Tests Debian:Testing and Fedora:Rawhide | 2 | name: Tests Debian:Testing and Fedora:Rawhide |
| 3 | 3 | ||
| 4 | on: | 4 | on: |
| 5 | workflow_dispatch: {} | 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 | ||
| 6 | push: | 12 | push: |
| 7 | branches-ignore: | 13 | branches-ignore: |
| 8 | - '*' | 14 | - '*' |
| @@ -24,7 +30,10 @@ jobs: | |||
| 24 | prepare: .github/prepare_debian.sh | 30 | prepare: .github/prepare_debian.sh |
| 25 | steps: | 31 | steps: |
| 26 | - name: Git clone repository | 32 | - name: Git clone repository |
| 27 | uses: actions/checkout@v4 | 33 | uses: actions/checkout@v6 |
| 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 }} | ||
| 28 | - name: Run the tests on ${{ matrix.distro }} | 37 | - name: Run the tests on ${{ matrix.distro }} |
| 29 | run: | | 38 | run: | |
| 30 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | 39 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol |
| @@ -38,7 +47,7 @@ jobs: | |||
| 38 | ${{ matrix.distro }} \ | 47 | ${{ matrix.distro }} \ |
| 39 | /bin/sh -c '${{ matrix.prepare }} && \ | 48 | /bin/sh -c '${{ matrix.prepare }} && \ |
| 40 | tools/setup && \ | 49 | tools/setup && \ |
| 41 | ./configure --enable-libtap --with-ipv6=no && \ | 50 | ./configure --enable-libtap && \ |
| 42 | make && \ | 51 | make && \ |
| 43 | make test && \ | 52 | make test && \ |
| 44 | make dist && \ | 53 | make dist && \ |
| @@ -59,7 +68,10 @@ jobs: | |||
| 59 | - {"distro": "fedora:rawhide", "build": ".github/mock.sh"} | 68 | - {"distro": "fedora:rawhide", "build": ".github/mock.sh"} |
| 60 | steps: | 69 | steps: |
| 61 | - name: Git clone repository | 70 | - name: Git clone repository |
| 62 | uses: actions/checkout@v4 | 71 | uses: actions/checkout@v6 |
| 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 }} | ||
| 63 | - name: Run the tests on ${{ matrix.distro }} | 75 | - name: Run the tests on ${{ matrix.distro }} |
| 64 | run: | | 76 | run: | |
| 65 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol | 77 | docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol |
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77ca6585..5a0b2943 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@v6 |
| 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 && \ |
| @@ -59,7 +69,10 @@ jobs: | |||
| 59 | # - {"distro": "oraclelinux:9", "build": ".github/mock.sh"} | 69 | # - {"distro": "oraclelinux:9", "build": ".github/mock.sh"} |
| 60 | steps: | 70 | steps: |
| 61 | - name: Git clone repository | 71 | - name: Git clone repository |
| 62 | uses: actions/checkout@v4 | 72 | uses: actions/checkout@v6 |
| 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 }} | ||
| 63 | - name: Run the tests on ${{ matrix.distro }} | 76 | - name: Run the tests on ${{ matrix.distro }} |
| 64 | run: | | 77 | run: | |
| 65 | 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 |
