-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (36 loc) · 1.33 KB
/
continuous-integration.yaml
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
name: Run Tests
on: [push, pull_request]
jobs:
runtests:
runs-on: ubuntu-latest
container: centos:7
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Determine hash for caching key
id: cachekeystep
run: echo "pomcachekey=${{ hashFiles('pom.xml') }}" >> $GITHUB_ENV
- name: set up dependencies
run: |
yum -y install epel-release http://yum.quattor.org/devel/quattor-release-1-1.noarch.rpm
yum -y install maven perl-Test-Quattor panc libselinux-utils wget perl-Parallel-ForkManager ncm-metaconfig ncm-ncd ncm-filesystems perl-Text-Glob
- name: set up template library core from git master
run: |
cd /tmp
# install library core in /tmp, tests need it
wget -O template-library-core-master.tar.gz https://codeload.github.com/quattor/template-library-core/tar.gz/master
tar -xvzf template-library-core-master.tar.gz
cd -
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: /tmp/m2
key: ${{ runner.os }}-m2-${{ env.pomcachekey }}
restore-keys: ${{ runner.os }}-m2-
- name: run tests
run: |
source /usr/bin/mvn_test.sh
mvn_test
env:
QUATTOR_TEST_TEMPLATE_LIBRARY_CORE: /tmp/template-library-core-master
MVN_ARGS: -Dmaven.repo.local=/tmp/m2