99 - master
1010
1111jobs :
12- test :
13- name : " JDK ${{ matrix.java }}"
14- strategy :
15- matrix :
16- java : [ 8, 11 ]
12+ build :
13+ name : ' Build with JDK 26'
1714 runs-on : ubuntu-latest
1815 steps :
1916 # Cancel any previous runs for the same branch that are still running.
@@ -23,34 +20,71 @@ jobs:
2320 access_token : ${{ github.token }}
2421 - name : ' Check out repository'
2522 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
26- - name : ' Set up JDK ${{ matrix.java }} '
23+ - name : ' Set up JDK 26 for compilation '
2724 uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
2825 with :
29- java-version : ${{ matrix.java }}
26+ java-version : 26
3027 distribution : ' temurin'
3128 cache : ' maven'
3229 - name : ' Install'
3330 shell : bash
3431 run : mvn -B -P!standard-with-extra-repos install -U -DskipTests=true
35- - name : ' Test'
36- shell : bash
37- run : mvn -B -P!standard-with-extra-repos verify -U -Dmaven.javadoc.skip=true
3832 - name : ' Javadoc Test Run'
3933 shell : bash
4034 run : mvn -B -P!standard-with-extra-repos javadoc:aggregate -U
35+ - name : ' Upload build artifacts'
36+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
37+ with :
38+ name : truth-jars
39+ path : |
40+ **/target/*.jar
41+ !**/target/*-sources.jar
42+ !**/target/*-javadoc.jar
43+
44+ test :
45+ name : " Test with JDK ${{ matrix.java }}"
46+ needs : build
47+ strategy :
48+ matrix :
49+ java : [ 8, 17, 25 ]
50+ runs-on : ubuntu-latest
51+ steps :
52+ - name : ' Check out repository'
53+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
54+ - name : ' Set up JDK ${{ matrix.java }} for testing'
55+ uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
56+ with :
57+ java-version : ${{ matrix.java }}
58+ distribution : ' temurin'
59+ cache : ' maven'
60+ - name : ' Download build artifacts'
61+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
62+ with :
63+ name : truth-jars
64+ - name : ' Unpack artifacts'
65+ shell : bash
66+ run : |
67+ for f in $(find . -name "*.jar" ! -name "*-gwt.jar"); do
68+ dest="${f%/target/*}/target/classes"
69+ mkdir -p "$dest"
70+ unzip -o "$f" -d "$dest"
71+ done
72+ - name : ' Test'
73+ shell : bash
74+ run : mvn -B -P!standard-with-extra-repos verify -U -Dmaven.javadoc.skip=true -Dmaven.main.skip=true
4175
4276 publish_snapshot :
4377 name : ' Publish snapshot'
44- needs : test
78+ needs : [build, test]
4579 if : github.event_name == 'push' && github.repository == 'google/truth'
4680 runs-on : ubuntu-latest
4781 steps :
4882 - name : ' Check out repository'
4983 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
50- - name : ' Set up JDK 11 '
84+ - name : ' Set up JDK 26 '
5185 uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
5286 with :
53- java-version : 11
87+ java-version : 26
5488 distribution : ' temurin'
5589 cache : ' maven'
5690 server-id : central
@@ -66,16 +100,16 @@ jobs:
66100 permissions :
67101 contents : write
68102 name : ' Generate latest docs'
69- needs : test
103+ needs : [build, test]
70104 if : github.event_name == 'push' && github.repository == 'google/truth'
71105 runs-on : ubuntu-latest
72106 steps :
73107 - name : ' Check out repository'
74108 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
75- - name : ' Set up JDK 11 '
109+ - name : ' Set up JDK 26 '
76110 uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
77111 with :
78- java-version : 11
112+ java-version : 26
79113 distribution : ' temurin'
80114 cache : ' maven'
81115 - name : ' Generate latest docs'
0 commit comments