-
-
Notifications
You must be signed in to change notification settings - Fork 20
51 lines (48 loc) · 1.55 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test
on:
push:
branches:
- $default-branch
- development
- master
# Run tests for any PRs
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
# The host should always be linux
runs-on: ubuntu-latest
name: Running tests on ${{ matrix.distro }}
strategy:
fail-fast: false
matrix:
distro:
- 'fedora:39'
- 'fedora:40'
include:
- distro: 'fedora:40'
pre: >-
dnf install -y sudo perl-Module-Install perl-Readonly perl-Monitoring-Plugin perl-Perl-Critic rpm-build perl-Net-DNS perl-Data-Validate-Domain perl-Net-IP perl-Data-Validate-IP perl-Capture-Tiny
- distro: 'fedora:39'
pre: >-
dnf install -y sudo perl-Module-Install perl-Readonly perl-Monitoring-Plugin perl-Perl-Critic rpm-build perl-Net-DNS perl-Data-Validate-Domain perl-Net-IP perl-Data-Validate-IP perl-Capture-Tiny
steps:
- name: Git clone repository
uses: actions/checkout@v3
with:
submodules: true
- name: Run the tests on ${{ matrix.distro }}
env:
PRE: ${{ matrix.pre }}
run: |
echo $PRE > ./prep-cmd.sh
docker run --network host -w /check_rbl -v ${PWD}:/check_rbl ${{ matrix.distro }} \
/bin/sh -c 'sh ./prep-cmd.sh \
&& uname -a \
&& perl Makefile.PL \
&& make test \
&& ./test_script.sh \
&& ./check_distribution.sh \
&& ./build_rpm.sh'