forked from buildless/plugin-gradle
-
Notifications
You must be signed in to change notification settings - Fork 0
204 lines (192 loc) · 5.28 KB
/
trigger.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name: CI
on:
## Event: Merge group checks
merge_group: {}
## Event: Push on `main` or `stable`
push:
branches:
- main
- stable
tags:
- "v*"
## Event: PR
pull_request:
types:
- opened
- closed
- reopened
- synchronize
paths:
## Trigger: CI Changes
- ".github/workflows/trigger.yml"
## Trigger: Global changes/release
- ".version"
- ".release"
## Trigger: Server Changes
- "gradle.properties"
- "*.kts"
- "**/*.kts"
- "**/*.kt"
- "**/*.java"
- "**/*.properties"
- "app/server/**"
- "gradle/**"
env:
CI: true
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
jobs:
## Build: Gradle Plugin
build-plugin:
name: "Build"
uses: elide-dev/build-infra/.github/workflows/jvm.gradle.yml@main
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
permissions:
checks: write
pull-requests: read
id-token: write
contents: write
actions: read
strategy:
fail-fast: false
max-parallel: 6
matrix:
platform: [Linux, Windows, macOS]
gradleLabel: ["Gradle 8.2", "Gradle 8.1"]
include:
- platform: Linux
runner: ubuntu-latest
tasks: koverXmlReport sonar
gradle: "8.2"
gradleLabel: "Gradle 8.2"
main: true
labs: false
- platform: Windows
runner: windows-latest
gradleLabel: "Gradle 8.2"
gradle: "8.2"
main: false
labs: false
- platform: macOS
runner: macos-latest
gradleLabel: "Gradle 8.2"
gradle: "8.2"
main: false
labs: false
- platform: Linux
runner: ubuntu-latest
gradleLabel: "Gradle 8.1"
gradle: "8.1"
main: false
labs: false
- platform: Windows
runner: windows-latest
gradleLabel: "Gradle 8.1"
gradle: "8.1"
main: false
labs: false
- platform: macOS
runner: macos-latest
gradleLabel: "Gradle 8.1"
gradle: "8.1"
main: false
labs: false
- platform: Windows
runner: windows-latest
gradleLabel: "Gradle Latest"
gradle: "release-candidate"
main: false
labs: true
- platform: macOS
runner: macos-latest
gradleLabel: "Gradle Latest"
gradle: "release-candidate"
main: false
labs: true
- platform: Linux
runner: ubuntu-latest
gradleLabel: "Gradle Latest"
gradle: "release-candidate"
main: false
labs: true
with:
label: "Plugin"
runner: "${{ matrix.runner }}"
action: "build test ${{ matrix.tasks }}"
flags: "--scan --stacktrace"
artifact: "buildless-plugin-gradle"
gradle: ${{ matrix.gradle }}
labs: ${{ fromJson(matrix.labs) }}
coverage_report: "build/reports/kover/report.xml"
provenance: "${{ fromJson(matrix.main) }}"
coverage: "${{ fromJson(matrix.main) }}"
artifacts: "${{ fromJson(matrix.main) }}"
## Checks: API Breakage
check-api:
name: "Check"
needs: ["build-plugin"]
uses: ./.github/workflows/module.apicheck.yml
secrets:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
permissions:
checks: write
contents: read
## Checks: CodeQL
check-codeql:
name: "Check"
needs: ["build-plugin"]
uses: ./.github/workflows/module.codeql.yml
secrets:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
permissions:
checks: write
pull-requests: read
id-token: write
contents: read
actions: read
security-events: write
## Checks: Detekt
check-detekt:
name: "Check"
needs: ["build-plugin"]
uses: ./.github/workflows/module.detekt.yml
secrets:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
permissions:
checks: write
pull-requests: read
id-token: write
contents: read
actions: read
security-events: write
## Checks: Qodana
check-qodana:
name: "Check"
needs: ["build-plugin"]
uses: ./.github/workflows/module.qodana.yml
secrets:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
permissions:
checks: write
pull-requests: read
id-token: write
contents: read
actions: read
security-events: write
## Checks: Dependency Review
dependency-review:
name: "Dependency Review"
needs: ["build-plugin"]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: "Setup: Checkout"
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: "Analysis: Dependency Review"
uses: actions/dependency-review-action@1360a344ccb0ab6e9475edef90ad2f46bf8003b1 # v3