Skip to content

Test All

Test All #3

Workflow file for this run

name: Test All
on:
workflow_dispatch:
jobs:
test_all:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle Caching
uses: gradle/actions/setup-gradle@v3
- name: Run ${{ matrix.os }} General Tests - Headless
uses: coactions/setup-xvfb@v1
with:
run: ./gradlew testAll
- name: Run ${{ matrix.os }} Regression Tests - Headless
uses: coactions/setup-xvfb@v1
with:
run: ./gradlew regressionTest
- name: Generate ${{ matrix.os }} JUnit Test Reports
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: ${{ matrix.os }} Tests
path: '**/build/test-results/**/TEST-*.xml'
reporter: java-junit
- name: Generate ${{ matrix.os }} Regression Test Reports
if: ${{ (!startsWith(matrix.os, 'windows')) && (success() || failure()) }}
uses: reg-viz/reg-actions@v2
with:
github-token: "${{ secrets.ACCESS_TOKEN }}"
image-directory-path: "./tests/images/"
artifact-name: "reg-${{ matrix.os }}"
- name: Upload Windows Test Results
if: ${{ startsWith(matrix.os, 'windows') && (success() || failure()) }}
uses: actions/upload-artifact@v2
with:
name: Windows-Tests
path: |
tests/*
retention-days: 1
#reg-viz fails on Windows, use Ubuntu instead
windows_reg:
if: success() || failure()
runs-on: ubuntu-latest
needs: [test_all]
steps:
- name: Download Windows Tests
uses: actions/download-artifact@v2
with:
name: Windows-Tests
path: DrawingBotV3-Free/tests/
- name: Generate Windows Regression Tests
uses: reg-viz/reg-actions@v2
with:
github-token: "${{ secrets.ACCESS_TOKEN }}"
image-directory-path: "./tests/images/"