11name : Tests
22
3- on :
4- push :
5- branches :
6- - " **" # all branches
7- - " !master" # except master
8- - " !develop" # except develop
3+ on : push
94
105jobs :
116 build :
127 runs-on : ubuntu-latest
8+ strategy :
9+ matrix :
10+ java : [8, 11, 17]
11+ timeout-minutes : 5
1312 steps :
14- - uses : actions/checkout@v3
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up JDK ${{ matrix.java }}
16+ uses : actions/setup-java@v4
17+ with :
18+ java-version : ${{ matrix.java }}
19+ distribution : " temurin"
20+
1521 - name : Cache npm dependencies
1622 uses : actions/cache@v3
1723 id : npm-cache
@@ -25,14 +31,10 @@ jobs:
2531 id : maven-cache
2632 with :
2733 path : ~/.m2/repository
28- key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
34+ key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
2935 restore-keys : |
30- maven-cache-v1-${{ runner.os }}-
31- - name : Set up JDK 8
32- uses : actions/setup-java@v3
33- with :
34- java-version : " 8"
35- distribution : " temurin"
36+ maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
37+
3638 - name : Install Maven dependencies
3739 # https://github.com/actions/cache#skipping-steps-based-on-cache-hit
3840 if : steps.maven-cache.outputs.cache-hit != 'true'
@@ -41,15 +43,16 @@ jobs:
4143 # https://github.com/actions/cache#skipping-steps-based-on-cache-hit
4244 if : steps.npm-cache.outputs.cache-hit != 'true'
4345 run : |
44- npm install &&
45- npm --prefix=selenium install &&
46- npm --prefix=playwright install
46+ npm ci &&
47+ npm --prefix=selenium ci &&
48+ npm --prefix=playwright ci
4749
4850 license-check :
4951 needs : build
5052 runs-on : ubuntu-latest
53+ timeout-minutes : 2
5154 steps :
52- - uses : actions/checkout@v3
55+ - uses : actions/checkout@v4
5356 - name : Maven compile licenses
5457 run : mvn compile license:add-third-party
5558 - name : Check Selenium licenses
6063 playwright-tests :
6164 needs : [license-check, build]
6265 runs-on : ubuntu-latest
66+ timeout-minutes : 5
67+ strategy :
68+ matrix :
69+ java : [8, 11, 17]
6370 steps :
64- - uses : actions/checkout@v3
71+ - uses : actions/checkout@v4
6572 - uses : actions/cache@v3
6673 name : Restore npm cache
6774 id : npm-cache
7582 id : maven-cache
7683 with :
7784 path : ~/.m2/repository
78- key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
85+ key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
7986 restore-keys : |
80- maven-cache-v1-${{ runner.os }}-
87+ maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
8188 - name : Start fixture server
8289 run : npm --prefix=playwright start &
8390 - name : Run Playwright tests
8693 selenium-tests :
8794 needs : [license-check, build]
8895 runs-on : ubuntu-latest
96+ timeout-minutes : 5
97+ strategy :
98+ matrix :
99+ java : [8, 11, 17]
89100 steps :
90- - uses : actions/checkout@v3
91- - uses : actions/setup-python@v4
101+ - uses : actions/checkout@v4
102+ - uses : actions/setup-python@v5
92103 - uses : actions/cache@v3
93104 name : Restore npm cache
94105 id : npm-cache
@@ -102,9 +113,9 @@ jobs:
102113 id : maven-cache
103114 with :
104115 path : ~/.m2/repository
105- key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
116+ key : maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
106117 restore-keys : |
107- maven-cache-v1-${{ runner.os }}-
118+ maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
108119 - name : Start fixture server
109120 run : python -m http.server 8001 &
110121 working-directory : selenium/node_modules/axe-test-fixtures/fixtures
0 commit comments