Skip to content

Commit 70acd56

Browse files
authored
Merge pull request #150 from jrha/ci-tests
workflows: Switch CI action over to our own container image
2 parents dcda6e2 + ba0d200 commit 70acd56

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,16 @@ on: [push, pull_request]
55
jobs:
66
runtests:
77
runs-on: ubuntu-latest
8-
container: centos:7
8+
container:
9+
image: ghcr.io/quattor/quattor-test-container:latest
910
steps:
1011
- name: Checkout code
11-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1213
- name: Determine hash for caching key
1314
id: cachekeystep
1415
run: echo "pomcachekey=${{ hashFiles('**/pom.xml') }}" >> $GITHUB_ENV
15-
- name: set up dependencies
16-
run: |
17-
yum -y install epel-release http://yum.quattor.org/devel/quattor-release-1-1.noarch.rpm
18-
# The available version of perl-Test-Quattor is too old for mvnprove.pl to
19-
# work, but this is a quick way of pulling in a lot of required dependencies.
20-
# Surprisingly `which` is not installed by default and panc depends on it.
21-
# libselinux-utils is required for /usr/sbin/selinuxenabled
22-
yum install -y maven perl-Test-Quattor which panc aii-ks ncm-lib-blockdevices \
23-
ncm-ncd git libselinux-utils sudo perl-Crypt-OpenSSL-X509 \
24-
perl-Data-Compare perl-Date-Manip perl-File-Touch perl-JSON-Any \
25-
perl-Net-DNS perl-Net-FreeIPA perl-Net-OpenNebula \
26-
perl-Net-OpenStack-Client perl-NetAddr-IP perl-REST-Client \
27-
perl-Set-Scalar perl-Text-Glob cpanminus gcc wget
28-
#perl-Git-Repository perl-Data-Structure-Util
29-
# Hack around the two missing Perl rpms for ncm-ceph
30-
cpanm install Git::Repository Data::Structure::Util
31-
- name: set up template library core from git master
32-
run: |
33-
cd /tmp
34-
# install library core in /tmp, tests need it
35-
wget -O template-library-core-master.tar.gz https://codeload.github.com/quattor/template-library-core/tar.gz/master
36-
tar -xvzf template-library-core-master.tar.gz
37-
cd -
3816
- name: Cache Maven packages
39-
uses: actions/cache@v3
17+
uses: actions/cache@v4
4018
with:
4119
path: /tmp/m2
4220
key: ${{ runner.os }}-m2-${{ env.pomcachekey }}
@@ -45,10 +23,9 @@ jobs:
4523
run: |
4624
# make sure it exists before chown
4725
mkdir -p /tmp/m2
48-
chown -R nobody:nobody . /tmp/m2
26+
chown -R quattortest:quattortest . /tmp/m2
4927
# we have to run as a non-root user to pass the spma tests
5028
# secondly, we first download all maven dependencies and then run the tests because it fails with hanging downloads otherwise.
51-
runuser --shell /bin/bash --preserve-environment --command "source /usr/bin/mvn_test.sh && mvn_run \"dependency:resolve $MVN_ARGS\" && mvn_test" nobody
29+
runuser --shell /bin/bash --preserve-environment --command "source /usr/bin/mvn_test.sh && mvn_run \"dependency:resolve-plugins dependency:go-offline $MVN_ARGS\" && mvn_test" quattortest
5230
env:
53-
QUATTOR_TEST_TEMPLATE_LIBRARY_CORE: /tmp/template-library-core-master
5431
MVN_ARGS: -Dmaven.repo.local=/tmp/m2

0 commit comments

Comments
 (0)