@@ -4,8 +4,20 @@ name: TEST
4
4
on :
5
5
push :
6
6
branches : [ main, 'release/**' ]
7
+ paths :
8
+ - ' **'
9
+ - ' !**.gitignore'
10
+ - ' !**.md'
11
+ - ' !**.github/workflows/*'
12
+ - ' **.github/workflows/TEST.yml'
7
13
pull_request :
8
14
branches : [ main, 'release/**' ]
15
+ paths :
16
+ - ' **'
17
+ - ' !**.gitignore'
18
+ - ' !**.md'
19
+ - ' !**.github/workflows/*'
20
+ - ' **.github/workflows/TEST.yml'
9
21
10
22
concurrency :
11
23
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -23,16 +35,10 @@ jobs:
23
35
fail-fast : true # Once working, comment this
24
36
matrix :
25
37
include :
26
- - { outputKey: testWindows, os: windows-latest, testTask: mingwX64Test, enableKotlinNative: true }
27
- - { outputKey: testLinux, os: ubuntu-latest, testTask: linuxX64Test, buildTasks: publishLinuxArm64PublicationToMavenLocal, enableKotlinNative: true }
28
- - { outputKey: testMacos, os: macos-latest, testTask: macosX64Test, buildTasks: publishMacosArm64PublicationToMavenLocal, enableKotlinNative: true }
29
- - { outputKey: testIos, os: macos-latest, testTask: iosX64Test, enableKotlinNative: true }
30
- # - { outputKey: testJs, os: ubuntu-latest, testTask: "wasmBrowserTest", buildTasks: "jsNodeTest jsBrowserTest" }
31
- - { outputKey: testJs, os: ubuntu-latest, testTask: "wasmBrowserTest", buildTasks: "jsBrowserTest jsDenoTest" }
32
- - { outputKey: testAndroid, os: ubuntu-latest, enableAndroid: true }
33
- - { outputKey: testJvmMacos, os: macos-latest, testTask: jvmTest apiCheck }
34
- - { outputKey: testJvmLinux, os: ubuntu-latest, testTask: jvmTest, precompileTask: compileTestKotlinJvm, enableKotlinNative: true, enableSandbox: true, e2e: true }
35
- - { outputKey: testJvmWindows, os: windows-latest, testTask: jvmTest, precompileTask: compileTestKotlinJvm }
38
+ - { outputKey: testMacosIos, os: macos-13, testTask: jvmTest macosX64Test iosX64Test, buildTasks: publishMacosArm64PublicationToMavenLocal }
39
+ - { outputKey: testJsAndroid, os: ubuntu-latest, testTask: "wasmBrowserTest", buildTasks: "jsBrowserTest jsDenoTest", enableAndroid: true }
40
+ - { outputKey: testLinux, os: ubuntu-latest, testTask: apiCheck jvmTest linuxX64Test, precompileTask: compileTestKotlinJvm, e2e: true }
41
+ - { outputKey: testWindows, os: windows-latest, testTask: jvmTest mingwX64Test jsDenoTest, precompileTask: compileTestKotlinJvm, enableCodecov: true }
36
42
# if: ${{ needs.changes.outputs[matrix.outputKey] == 'true' }}
37
43
timeout-minutes : 30
38
44
runs-on : ${{ matrix.os }}
@@ -44,15 +50,17 @@ jobs:
44
50
- { name: Set up JDK, uses: actions/setup-java@v4, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
45
51
- { name: Prepare Gradle, uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 } # https://github.com/gradle/actions/releases/tag/v3.5.0
46
52
- { name: Start gradle, run: ./gradlew }
47
- - { if: "${{ matrix.precompileTask }}", name: "Building ${{ matrix.precompileTask }} classes", run: "./gradlew --no-configuration-cache --stacktrace ${{ matrix.precompileTask }}" }
48
- - { if: "${{ matrix.testTask }}", name: "Run ${{ matrix.testTask }} tests", run: "./gradlew --no-configuration-cache ${{ matrix.testTask }}" }
49
- - { if: "${{ matrix.buildTasks }}", name: "Run ${{ matrix.buildTasks }}", run: "./gradlew --no-configuration-cache ${{ matrix.buildTasks }}" }
53
+ - { if: "${{ matrix.precompileTask }}", name: "Building ${{ matrix.precompileTask }} classes", run: "./gradlew --no-configuration-cache --stacktrace --build-cache ${{ matrix.precompileTask }}" }
54
+ - { if: "${{ matrix.enableCodecov }}", name: "Upload coverage reports to Codecov", uses: "codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673", with: { token: "${{ secrets.CODECOV_TOKEN }}" } } # https://github.com/codecov/codecov-action/releases/tag/v4.5.0
55
+ - { if: "${{ matrix.testTask }}", name: "Run ${{ matrix.testTask }} tests", run: "./gradlew --no-configuration-cache --build-cache ${{ matrix.testTask }}" }
56
+ - { if: "${{ matrix.buildTasks }}", name: "Run ${{ matrix.buildTasks }}", run: "./gradlew --no-configuration-cache --build-cache ${{ matrix.buildTasks }}" }
50
57
- name : Enable KVM
51
58
if : " ${{ matrix.enableAndroid }}"
52
59
run : |
53
60
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
54
61
sudo udevadm control --reload-rules
55
62
sudo udevadm trigger --name-match=kvm
56
- - { name: "Run Android Tests", if: "${{ matrix.enableAndroid }}", uses: reactivecircus/android-emulator-runner@v2, with: { "api-level": 21, "script": "./gradlew --no-configuration-cache connectedCheck lintDebug" } }
63
+ - { name: "Run Android Tests", if: "${{ matrix.enableAndroid }}", uses: reactivecircus/android-emulator-runner@v2, with: { "api-level": 21, "script": "./gradlew --no-configuration-cache --build-cache connectedCheck lintDebug" } }
57
64
- { name: Archive Test Results, if: failure(), uses: actions/upload-artifact@v4, with: { name: "test-results-${{ matrix.outputKey }}", retention-days: 21, path: "**/build/reports", if-no-files-found: ignore } }
58
- - { if: "${{ matrix.e2e }}", name: Publish to maven local, run: ./gradlew --no-configuration-cache publishJvmLocal publishKotlinMultiplatformPublicationToMavenLocal }
65
+ - { if: "${{ matrix.e2e }}", name: Publish to maven local, run: ./gradlew --no-configuration-cache --build-cache publishJvmLocal publishKotlinMultiplatformPublicationToMavenLocal }
66
+ - { name: Code coverage, run: ./gradlew --build-cache koverXmlReport }
0 commit comments