-
Notifications
You must be signed in to change notification settings - Fork 47
84 lines (67 loc) · 2.29 KB
/
test_all.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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/"