Run headless tests #172
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup java (tests) | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'oracle' | |
java-version: '22' | |
cache: 'maven' | |
server-id: 'OpenJFX Test Builds' | |
server-username: NEXUS_USERNAME | |
server-password: NEXUS_PASSWORD | |
- name: Build project (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: | | |
./mvnw -B -ntp -Ptest verify -f rta | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Build project (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
.\mvnw -B -ntp -Ptest verify -f rta | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Setup Java (distribution) | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'oracle' | |
cache: 'maven' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_CENTRAL_TOKEN | |
- name: Publish Snapshots | |
if: github.ref == 'refs/heads/main' && runner.os == 'Linux' | |
run: | | |
ver=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout -f rta) | |
if [[ $ver == *"SNAPSHOT"* ]]; then | |
./mvnw -B -ntp -Dmaven.test.skip=true deploy -f rta | |
fi | |
shell: bash | |
env: | |
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }} |