-
-
Notifications
You must be signed in to change notification settings - Fork 5
133 lines (116 loc) · 4.64 KB
/
CI.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI # Check Gradle and AGP combinations
on: push
jobs:
build:
name: 1 🔨 Build
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Set up JDK 11.
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: Checkout ${{ github.ref }} branch in ${{ github.repository }} repository.
uses: actions/checkout@v3
- name: Gradle status.
run: ./gradlew --status
- name: Verify docs/examples/release for snapshot.
working-directory: docs/examples/release
run: ./gradlew --stacktrace build --init-script ../../../test/src/main/resources/net/twisterrob/gradle/test/runtime.init.gradle.kts
- name: Gradle status.
run: ./gradlew --status
check:
name: 2 🛠️ ${{ matrix.name }}
runs-on: ubuntu-22.04
env:
JOB_NAME: ${{ matrix.name }} (${{ matrix.agp }} on ${{ matrix.gradle }})
timeout-minutes: 12
steps:
- name: Set up JDK 11.
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: Checkout ${{ github.ref }} branch in ${{ github.repository }} repository.
uses: actions/checkout@v3
- name: Check ${{ env.JOB_NAME }}.
run: >
./gradlew
--no-daemon
--no-build-cache
--no-configuration-cache
--no-watch-fs
--stacktrace
--continue
testReport :plugin:signing:test --info
-Pnet.twisterrob.gradle.build.verboseReports=true
-Pnet.twisterrob.test.android.pluginVersion=${{ matrix.agp }}
-Pnet.twisterrob.test.kotlin.pluginVersion=1.6.21
-Pnet.twisterrob.gradle.runner.gradleVersion=${{ matrix.gradle }}
-Pnet.twisterrob.test.gradle.javaHomeEnv=JAVA_HOME_11_X64
- name: Upload "${{ env.JOB_NAME }} Test Results XMLs" artifact.
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ env.JOB_NAME }} Test Results XMLs
path: ${{ github.workspace }}/**/build/test-results/test/TEST-*.xml
- name: Upload "${{ env.JOB_NAME }} Test Results HTML" artifact.
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ env.JOB_NAME }} Test Results HTML
path: ${{ github.workspace }}/build/reports/tests/all/
- name: Upload "${{ env.JOB_NAME }} Test Results HTMLs" artifact.
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ env.JOB_NAME }} Test Results HTMLs
path: ${{ github.workspace }}/**/build/reports/tests/test/
strategy:
fail-fast: false
matrix:
include:
- name: "AGP 7.4.x on Gradle 7.5+ - plugin"
gradle: 7.5.1
agp: 7.4.1
- name: "AGP 7.4.x on Gradle 7.x - plugin"
gradle: 7.6
agp: 7.4.1
- name: "AGP 7.4.x on Gradle 8.x - plugin"
gradle: 8.0-rc-5
agp: 7.4.1
publish-test-results:
name: 3 📢 Publish Tests Results
runs-on: ubuntu-22.04
needs: check
if: success() || failure()
timeout-minutes: 10
steps:
- name: Download 'AGP 7.4.x on Gradle 7.5+ - plugin (7.4.1 on 7.5.1) Test Results XMLs' artifact.
if: success() || failure()
uses: actions/download-artifact@v3
with:
name: AGP 7.4.x on Gradle 7.5+ - plugin (7.4.1 on 7.5.1) Test Results XMLs
path: artifacts/AGP 7.4.x on Gradle 7.5+ - plugin (7.4.1 on 7.5.1) Test Results XMLs
- name: Download 'AGP 7.4.x on Gradle 7.x - plugin (7.4.1 on 7.6) Test Results XMLs' artifact.
if: success() || failure()
uses: actions/download-artifact@v3
with:
name: AGP 7.4.x on Gradle 7.x - plugin (7.4.1 on 7.6) Test Results XMLs
path: artifacts/AGP 7.4.x on Gradle 7.x - plugin (7.4.1 on 7.6) Test Results XMLs
- name: Download 'AGP 7.4.x on Gradle 8.x - plugin (7.4.1 on 8.0-rc-5) Test Results XMLs' artifact.
if: success() || failure()
uses: actions/download-artifact@v3
with:
name: AGP 7.4.x on Gradle 8.x - plugin (7.4.1 on 8.0-rc-5) Test Results XMLs
path: artifacts/AGP 7.4.x on Gradle 8.x - plugin (7.4.1 on 8.0-rc-5) Test Results XMLs
- name: Publish "Test Results" check suite.
if: success() || failure()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: 0 🔔 Test Results
comment_mode: off
report_individual_runs: true
test_changes_limit: 0
junit_files: artifacts/* Test Results XMLs/**/*.xml