Skip to content

Commit e8ed9a6

Browse files
committed
Reuse shared workflows to run tests
1 parent 2e95e6a commit e8ed9a6

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,7 @@ name: Run Tests
33
on: [push, pull_request]
44

55
jobs:
6-
runtests:
7-
runs-on: ubuntu-latest
8-
container:
9-
image: ghcr.io/quattor/quattor-test-container:latest
10-
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v4
13-
- name: Determine hash for caching key
14-
id: cachekeystep
15-
run: echo "pomcachekey=${{ hashFiles('**/pom.xml') }}" >> $GITHUB_ENV
16-
- name: Cache Maven packages
17-
uses: actions/cache@v4
18-
with:
19-
path: /tmp/m2
20-
key: ${{ runner.os }}-m2-${{ env.pomcachekey }}
21-
restore-keys: ${{ runner.os }}-m2-
22-
- name: set up dependencies
23-
run: |
24-
dnf -y install perl-Config-General
25-
- name: run tests
26-
run: |
27-
# make sure it exists before chown
28-
mkdir -p /tmp/m2
29-
chown -R quattortest:quattortest . /tmp/m2
30-
# we have to run as a non-root user to pass the spma tests
31-
# secondly, we first download all maven dependencies and then run the tests because it fails with hanging downloads otherwise.
32-
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
33-
env:
34-
MVN_ARGS: -Dmaven.repo.local=/tmp/m2
6+
standard-maven:
7+
uses: quattor/release/.github/workflows/maven-tests.yaml@main
8+
standard-pan:
9+
uses: quattor/release/.github/workflows/pan-template-tests.yaml@main

0 commit comments

Comments
 (0)