Skip to content

Commit e1145a3

Browse files
committed
Make GitHub Actions cover "make check" and "make uninstall"
Signed-off-by: Sebastian Pipping <[email protected]>
1 parent f1e40ab commit e1145a3

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Run the test suite
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
- cron: '0 14 * * 5' # Every Friday 2pm
8+
workflow_dispatch:
9+
10+
# Drop permissions to minimum for security
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test_suite:
16+
name: Run the test suite
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |-
23+
packages=(
24+
# Perl runtime dependencies as documented in README
25+
libcapture-tiny-perl # CPAN Capture::Tiny
26+
libdatetime-perl # CPAN DateTime
27+
libdevel-cover-perl # CPAN Devel::Cover
28+
libdigest-md5-file-perl # CPAN Digest::MD5
29+
libfile-spec-native-perl # CPAN File::Spec
30+
libjson-xs-perl # CPAN JSON::XS
31+
# CPAN Memory::Process, see below
32+
# CPAN Module::Load::Conditional
33+
libscalar-list-utils-perl # CPAN Scalar::Util
34+
# CPAN Time::HiRes
35+
36+
# Additional dependencies for "make check"
37+
llvm # for command "llvm-profdata"
38+
libgd-perl # CPAN GD
39+
)
40+
set -x
41+
sudo apt-get update
42+
sudo apt-get install --no-install-recommends --yes -V "${packages[@]}"
43+
sudo perl -MCPAN -e 'install(Memory::Process)' # no package in Debian
44+
45+
- name: make install
46+
run: |-
47+
make install PREFIX=/usr CFG_DIR=/etc DESTDIR="${PWD}/ROOT"
48+
find ROOT/ | sort | xargs -r ls -ld
49+
50+
- name: make uninstall
51+
run: |-
52+
make uninstall PREFIX=/usr CFG_DIR=/etc DESTDIR="${PWD}/ROOT"
53+
find ROOT/ | sort | xargs -r ls -ld
54+
diff -u0 <(echo 'total 0') <(ls -l ROOT/) # i.e. fail CI if leftovers
55+
56+
- name: make check
57+
run: |-
58+
make check
59+
60+
# NOTE: This is a workaround to fail at test failure while
61+
# "make check" fails to exit with non-zero exit code
62+
# in case of failures
63+
tail -n1 tests/test.log | tee /dev/stderr | grep ', 0 failed'

0 commit comments

Comments
 (0)