-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.22 KB
/
build-and-test.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
name: Build and Test
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Build (Generator)
run: ./gradlew twirp-kmp-generator:build
- name: Test (Runtime)
run: ./gradlew twirp-kmp-runtime:testReleaseUnitTest
- name: Archive Runtime Test Report
if: success() || failure() # Allow canceling per https://stackoverflow.com/a/73015952
uses: actions/upload-artifact@v4
with:
name: testReleaseUnitTest report
path: runtime/build/reports/tests/testReleaseUnitTest