Skip to content

Duck 🦆 season #21502

Duck 🦆 season

Duck 🦆 season #21502

Workflow file for this run

name: Java Tests
on:
schedule:
- cron: 0 */6 * * *
pull_request: {}
jobs:
java_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Run tests with Gradle
if: ${{ always() }}
run: gradle test --project-dir java/gradle
continue-on-error: true
- name: Run playwright tests with Maven
if: ${{ always() }}
run: mvn test --file java/playwright/pom.xml --quiet
continue-on-error: true
- name: Run tests with Maven
id: run_tests
if: ${{ always() }}
run: mvn test --file java/maven/pom.xml --quiet
continue-on-error: true
- name: Process test results
# Run this step even if the test step ahead fails
if: ${{ always() }}
uses: trunk-io/analytics-uploader@main
env:
TRUNK_PUBLIC_API_ADDRESS: ${{ vars.TRUNK_API_ENDPOINT }}
with:
# Path to your test results.
junit-paths:
"**/gradle/**/test-results/**/*.xml,**/surefire-reports/*.xml,**/playwright/**/surefire-reports/*.xml"
# Provide your Trunk organization slug.
org-slug: ${{ vars.ORG_SLUG }}
# Provide your Trunk API token as a GitHub secret.
token: ${{ secrets.TRUNK_TOKEN }}
# Pass the test outcome for quarantining support
previous-step-outcome: ${{ steps.run_tests.outcome }}
- name: Upload JUnit XML artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: java-junit-results
path: |
**/gradle/**/test-results/**/*.xml
**/surefire-reports/*.xml
**/playwright/**/surefire-reports/*.xml
retention-days: 7