Skip to content

Merge pull request #534 from nodebox/ci/reproducible-native-builds #356

Merge pull request #534 from nodebox/ci/reproducible-native-builds

Merge pull request #534 from nodebox/ci/reproducible-native-builds #356

Workflow file for this run

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