-
Notifications
You must be signed in to change notification settings - Fork 89
61 lines (55 loc) · 1.69 KB
/
Copy pathtest.yml
File metadata and controls
61 lines (55 loc) · 1.69 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
name: Build and run tests
on:
push:
workflow_dispatch:
inputs:
e2eFail:
description: "Intentionally fail E2E to verify artifacts"
required: false
default: "false"
env:
# Run JS actions on Node 24, silencing Node 20 deprecation warnings for actions
# without a Node-24 release yet (e.g. upload-artifact) ahead of the forced migration.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '25'
- name: Install Ant
run: sudo apt-get update && sudo apt-get install -y ant
- name: Run tests
run: ant test
- name: Build jar
run: ant jar
e2e:
runs-on: ubuntu-latest
needs: build
env:
NODEBOX_E2E: "1"
NODEBOX_E2E_ARTIFACTS: "build/e2e-artifacts"
NODEBOX_E2E_FORCE_FAIL: ${{ github.event_name == 'workflow_dispatch' && inputs.e2eFail == 'true' && '1' || '0' }}
steps:
- uses: actions/checkout@v5
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '25'
- name: Install Ant and Xvfb
run: sudo apt-get update && sudo apt-get install -y ant xvfb openbox
- name: Run E2E tests
run: xvfb-run -a -s "-screen 0 1920x1080x24" bash -lc "openbox & ant test-e2e"
- name: Upload E2E artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-artifacts
path: |
build/e2e-artifacts
reports/TEST-*.xml