-
Notifications
You must be signed in to change notification settings - Fork 41
46 lines (43 loc) · 1.35 KB
/
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
name: Test
on:
pull_request:
branches: [main]
workflow_call:
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
# Test on macOS for the macOS build targets
- macos-latest
runs-on: ${{matrix.os}}
name: Test on ${{matrix.os}}
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/setup-java@v4
with:
distribution: temurin
# Library is built for JVM 1.8, but we run gradle itself with a newer one because we can
# and the publishing plugin requires it
java-version: 21
cache: 'gradle'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache Kotlin JS/Native dependencies
uses: actions/cache@v4
with:
path: |
~/.konan
~/.npm
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: build-${{ runner.os }}-${{ hashFiles('build.gradle.kts', '**/gradle-wrapper.properties', 'settings.gradle.kts', 'kotlin-js-store/yarn.lock') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('build.gradle.kts') }}
build-${{ runner.os }}-
- name: Assemble & Test project
run: ./gradlew build