-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.7 KB
/
build.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
name: Build
on:
push:
workflow_dispatch: # allow manual trigger
jobs:
build:
strategy:
fail-fast: false
# screenshot tests cannot be run across operating systems; see https://github.com/JetBrains/compose-multiplatform/issues/3442
matrix:
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- run: ./gradlew --stacktrace --continue check
- name: Upload mismatching screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: mismatching-screenshots
path: '**/src/test/resources/screenshots/**/*-MISMATCH.png'
if-no-files-found: ignore
retention-days: 7
- name: Upload unit test results to codecov
uses: codecov/codecov-action@v4
if: always() # upload even if the build failed, in case it was just test failures
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./code-coverage-report/build/reports/jacoco/jacocoMergedUnitTestReport/jacocoMergedUnitTestReport.xml
fail_ci_if_error: true
verbose: true
flags: unit
- name: Upload screenshot test results to codecov
uses: codecov/codecov-action@v4
if: always() # upload even if the build failed, in case it was just test failures
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./code-coverage-report/build/reports/jacoco/jacocoMergedScreenshotTestReport/jacocoMergedScreenshotTestReport.xml
fail_ci_if_error: true
verbose: true
flags: screenshot