Repository navigation
50 lines (43 loc) · 1.61 KB
/
Copy pathtests.yml
File metadata and controls
50 lines (43 loc) · 1.61 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
# Runs a stable subset of the lab on every push and pull request to main, and on demand:
# - group "java": the 40 Java coding examples (no browser, fully deterministic)
# - group "smoke": the OrangeHRM smoke tests in headless Chrome
# The full suite (148 tests) depends on two public practice sites and is meant to be run
# locally (see the README); it is not run here so a red badge always means a real problem.
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows a manual run from the Actions tab
workflow_dispatch:
# A newer push to the same branch cancels the run that is still going.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: Java examples + smoke (headless Chrome, JDK 17)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- name: Set up Java 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'
cache: maven # reuses downloaded dependencies between runs (keyed on pom.xml)
# Chrome is preinstalled on ubuntu-latest; Selenium Manager fetches the matching driver.
- name: Run the java and smoke groups
run: mvn -B clean test -Dgroups=java,smoke -Dheadless=true
# Kept even when tests fail, so failures can be analysed
- name: Keep the report
if: always()
uses: actions/upload-artifact@v7
with:
name: test-report
path: target/surefire-reports/selenium-test-report.html
if-no-files-found: ignore