-
Notifications
You must be signed in to change notification settings - Fork 3
103 lines (84 loc) · 2.51 KB
/
graphviz-multi-java-test.yml
File metadata and controls
103 lines (84 loc) · 2.51 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: GraphViz Multi-Java Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering
jobs:
build-jar:
name: Build JAR with Java 8
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
cache: 'maven'
- name: Build JAR
run: mvn clean package -DskipTests
- name: Upload JAR artifact
uses: actions/upload-artifact@v4
with:
name: test-jar
path: target/CS410-Exam-*.jar
retention-days: 1
test-graphviz:
name: Test JAR on Java ${{ matrix.java }}
runs-on: ubuntu-latest
needs: build-jar
strategy:
fail-fast: false # Continue testing other versions even if one fails
matrix:
java: [8, 11, 17, 21, 24, 25]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin' # Eclipse Temurin (AdoptOpenJDK)
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Download JAR artifact
uses: actions/download-artifact@v4
with:
name: test-jar
path: downloaded-jar
- name: Extract JAR to target directory
run: |
mkdir -p target/classes
unzip -o downloaded-jar/CS410-Exam-*.jar -d target/classes
- name: Print Java info
run: |
java -version
echo "JAVA_HOME=$JAVA_HOME"
- name: Run GraphViz tests
run: mvn test -Dtest=GraphvizEngineTest
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-java${{ matrix.java }}
path: |
target/surefire-reports/
target/test-classes/
# Optional: Test Java 26 (early access) on Linux only
test-java-26:
name: Test on Java 26 (EA) - Linux
runs-on: ubuntu-latest
continue-on-error: true # Don't fail workflow if Java 26 fails
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java 26
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '26-ea'
cache: 'maven'
- name: Run GraphViz tests
run: mvn test -Dtest=GraphvizEngineTest