-
Notifications
You must be signed in to change notification settings - Fork 102
123 lines (115 loc) · 3.93 KB
/
tests.yml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Tests
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 17]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: "temurin"
- name: Cache npm dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- name: Cache Maven dependencies
uses: actions/cache@v4
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Install Maven dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.maven-cache.outputs.cache-hit != 'true'
run: mvn clean install -DskipTests
- name: Install NPM dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
npm ci &&
npm --prefix=selenium ci &&
npm --prefix=playwright ci
license-check:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- name: Maven compile licenses
run: mvn compile license:add-third-party
- name: Check Selenium licenses
run: node scripts/license-check.js selenium/target/generated-sources/license/THIRD-PARTY.txt
- name: Check Playwright licenses
run: node scripts/license-check.js playwright/target/generated-sources/license/THIRD-PARTY.txt
playwright-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
java: [8, 11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v4
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Start fixture server
run: npm --prefix=playwright start &
- name: Run Playwright tests
run: mvn test -q -pl playwright
selenium-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
java: [8, 11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/cache@v4
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v4
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Start fixture server
run: python -m http.server 8001 &
working-directory: selenium/node_modules/axe-test-fixtures/fixtures
- name: Run Selenium tests
run: mvn test -q -pl selenium