mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
90 lines
3.2 KiB
YAML
90 lines
3.2 KiB
YAML
---
|
|
name: Tests Debian:Testing and Fedora:Rawhide
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
debug_enabled:
|
|
type: boolean
|
|
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
|
required: false
|
|
default: false
|
|
push:
|
|
branches-ignore:
|
|
- '*'
|
|
schedule:
|
|
# Run every week on Monday at 9:00 AM (UTC)
|
|
- cron: '0 9 * * 1'
|
|
|
|
jobs:
|
|
full-test:
|
|
name: Running unit and integrationt tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
distro:
|
|
- 'debian:testing'
|
|
include:
|
|
- distro: 'debian:testing'
|
|
prepare: .github/prepare_debian.sh
|
|
steps:
|
|
- name: Git clone repository
|
|
uses: actions/checkout@v6
|
|
- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
|
|
uses: mxschmitt/action-tmate@v3
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
|
- name: Run the tests on ${{ matrix.distro }}
|
|
run: |
|
|
docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
|
|
docker run \
|
|
-e NPTEST_ACCEPTDEFAULT=1 \
|
|
-e NPTEST_CACHE="/src/.github/NPTest.cache" \
|
|
-w /src -v ${PWD}:/src \
|
|
--tmpfs /media/ramdisk1 \
|
|
-v /var/run/utmp:/var/run/utmp \
|
|
--mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
|
|
${{ matrix.distro }} \
|
|
/bin/sh -c '${{ matrix.prepare }} && \
|
|
tools/setup && \
|
|
./configure --enable-libtap && \
|
|
make && \
|
|
make test && \
|
|
make dist && \
|
|
tar zxf monitoring-plugins-*.tar.gz && \
|
|
cd monitoring-plugins-*/ && \
|
|
./configure && \
|
|
make'
|
|
docker container prune -f
|
|
docker volume prune -f
|
|
|
|
build-test:
|
|
name: Running rpm build test on ${{ matrix.distro }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- {"distro": "fedora:rawhide", "build": ".github/mock.sh"}
|
|
steps:
|
|
- name: Git clone repository
|
|
uses: actions/checkout@v6
|
|
- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
|
|
uses: mxschmitt/action-tmate@v3
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
|
- name: Run the tests on ${{ matrix.distro }}
|
|
run: |
|
|
docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 tmp-vol
|
|
docker run \
|
|
--privileged=true \
|
|
-e NPTEST_ACCEPTDEFAULT=1 \
|
|
-e NPTEST_CACHE="/src/.github/NPTest.cache" \
|
|
-w /src -v ${PWD}:/src \
|
|
--tmpfs /media/ramdisk1 \
|
|
-v /var/run/utmp:/var/run/utmp \
|
|
--mount source=tmp-vol,destination=/src,target=/media/ramdisk2 \
|
|
${{ matrix.distro }} \
|
|
/bin/sh -c '${{ matrix.build }} && \
|
|
ls -la'
|
|
docker container prune -f
|
|
docker volume prune -f
|