-
Notifications
You must be signed in to change notification settings - Fork 42
90 lines (82 loc) · 2.37 KB
/
run-tests.yml
File metadata and controls
90 lines (82 loc) · 2.37 KB
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
85
86
87
88
89
90
name: Run tests on all platforms
on: [ workflow_call, workflow_dispatch ]
defaults:
run:
shell: bash
jobs:
build-project:
name: Build project on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-gradle
with:
cache-read-only: ${{ github.ref_name != 'master' }}
- run: >
./gradlew
build publishToMavenLocal
--continue
-Prsocketbuild.skipTestTasks=true
-Prsocketbuild.skipLinkTasks=true
run-tests:
needs: [ build-project ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
target: [ 'jvm', 'jvm11', 'jvm17', 'jvm21', 'web', 'native' ]
include:
- os: 'macos-latest'
target: 'macos'
- os: 'macos-latest'
target: 'ios'
- os: 'macos-latest'
target: 'watchos'
- os: 'macos-latest'
target: 'tvos'
- os: 'windows-latest'
target: 'native'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-gradle
- run: ./gradlew ${{ matrix.target }}Test --continue
- if: always() && !cancelled()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.os }}-${{ matrix.target }}
path: "**/build/test-results/*Test/TEST-*.xml"
retention-days: 1
publish-test-results:
needs: [ run-tests ]
if: always()
name: Publish test report
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: test-reports-*
path: test-reports
merge-multiple: 'true'
- name: Publish Test Report
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: test-reports/**/TEST-*.xml
link-native:
needs: [ run-tests ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-gradle
- run: ./gradlew linkAll --continue