Skip to content

Commit 75c157a

Browse files
committed
github: run tests using docker compose
1 parent 162ca28 commit 75c157a

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.github/workflows/build.yml

+9
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@ jobs:
1919
- name: Build with Maven
2020
run: mvn --batch-mode --update-snapshots package
2121

22+
- name: Run pynfs tests in container
23+
id: tester
24+
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f full-test.yml up --build --quiet-pull --exit-code-from tester
25+
26+
- name: Publish Test Report
27+
uses: mikepenz/action-junit-report@v5
28+
if: always()
29+
with:
30+
report_paths: 'report/*.xml'

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM almalinux/9-minimal
2+
3+
RUN microdnf install -y java-21-openjdk-headless && \
4+
microdnf clean all && \
5+
rm -rf /var/cache/yum
6+
7+
RUN mkdir /nfs4j
8+
COPY basic-server/target/basic-server.jar /nfs4j/basic-server.jar
9+
10+
11+
CMD ["java", "-jar", "/nfs4j/basic-server.jar"]

full-test.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# this is docker-compose file to run full tests
2+
3+
version: "2"
4+
5+
6+
services:
7+
nfs4j:
8+
build:
9+
context: .
10+
dockerfile: Dockerfile
11+
12+
ports:
13+
- "2049:2049"
14+
image: "nfs4j:dev"
15+
container_name: "nfs4j"
16+
17+
tester:
18+
image: dcache/pynfs:0.5
19+
container_name: "tester"
20+
depends_on:
21+
- nfs4j
22+
entrypoint: ["/bin/sh","-c"]
23+
command:
24+
- |
25+
sleep 10
26+
/run-nfs4.0.sh --xml=/report/xunit-report-v40.xml --maketree nfs4j:/data all \
27+
noACC2a noACC2b noACC2c noACC2d noACC2f noACC2r noACC2s \
28+
noCID1 noCID2 noCID4a noCID4b noCID4c noCID4d noCID4e \
29+
noCLOSE10 noCLOSE12 noCLOSE5 noCLOSE6 noCLOSE8 noCLOSE9 \
30+
noCMT1aa noCMT1b noCMT1c noCMT1d noCMT1e noCMT1f noCMT2a noCMT2b noCMT2c noCMT2d noCMT2f \
31+
noCMT2s noCMT3 noCMT4 noCR12 noLKT1 noLKT2a noLKT2b noLKT2c noLKT2d noLKT2f noLKT2s noLKT3 \
32+
noLKT4 noLKT6 noLKT7 noLKT8 noLKT9 noLKU10 noLKU3 noLKU4 noLKU5 noLKU6 noLKU6b noLKU7 noLKU8 \
33+
noLKU9 noLKUNONE noLOCK12a noLOCK12b noLOCK13 noLOCKRNG noLOCKCHGU noLOCKCHGD noRLOWN3 \
34+
noOPCF1 noOPCF6 noOPDG2 noOPDG3 noOPDG6 noOPDG7 noOPEN15 noOPEN18 noOPEN2 noOPEN20 noOPEN22 \
35+
noOPEN23 noOPEN24 noOPEN26 noOPEN27 noOPEN28 noOPEN3 noOPEN30 noOPEN4 noRENEW3 noRD1 noRD10 \
36+
noRD2 noRD3 noRD5 noRD5a noRD6 noRD7a noRD7b noRD7c noRD7d noRD7f noRD7s noRDDR12 noRDDR11 \
37+
noRPLY1 noRPLY10 noRPLY12 \
38+
noRPLY14 noRPLY2 noRPLY3 noRPLY5 noRPLY6 noRPLY7 noRPLY8 noRPLY9 noSATT3d noSATT4 noSATT6d \
39+
noSATT6r noSATT18 noSEC7 noWRT1 noWRT11 noWRT13 noWRT14 noWRT15 noWRT18 noWRT19 noWRT1b noWRT2 \
40+
noWRT3 noWRT6a noWRT6b noWRT6c noWRT6d noWRT6f noWRT6s noWRT8 noWRT9
41+
/run-nfs4.1.sh --noinit --minorversion=2 --xml=/report/xunit-report-v41.xml nfs4j:/data all deleg xattr \
42+
noCOUR2 noCSESS25 noCSESS26 noCSESS27 noCSESS28 noCSESS29 noCSID3 noCSID4 noCSID9 noEID5f \
43+
noEID50 noOPEN31 noSEQ6 noRECC3 noSEQ7 noSEQ10b noSEQ2 noXATT11 noXATT10 noALLOC1 noALLOC2 noALLOC3
44+
volumes:
45+
- ./report:/report

0 commit comments

Comments
 (0)