-
Notifications
You must be signed in to change notification settings - Fork 454
159 lines (150 loc) · 4.42 KB
/
pr-unit.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
name: Unit Tests - PR
on:
merge_group:
types: [checks_requested]
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
- reopened
jobs:
all_unit_tests:
name: "All Unit Tests"
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci/skip-unit') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
package:
[
cdktf,
cdktf-cli,
"@cdktf/hcl2cdk",
"@cdktf/hcl2json",
"@cdktf/provider-schema",
"@cdktf/provider-generator",
"@cdktf/commons",
"@cdktf/cli-core",
]
terraform_version: ["1.6.5", "1.5.5"]
with:
concurrency_group_prefix: pr-all
package: ${{ matrix.package }}
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_cli_core:
name: "@cdktf/cli Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/cli-core') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-cli-core
package: "@cdktf/cli-core"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_commons:
name: "@cdktf/commons Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/commons') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-commons
package: "@cdktf/commons"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_hcl2cdk:
name: "@cdktf/hcl2cdk Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/hcl2cdk') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-hcl2cdk
package: "@cdktf/hcl2cdk"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_hcl2json:
name: "@cdktf/hcl2json Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/hcl2json') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-hcl2json
package: "@cdktf/hcl2json"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_provider_generator:
name: "@cdktf/provider-generator Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/provider-generator') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-provider-generator
package: "@cdktf/provider-generator"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf_cli:
name: "cdktf-cli Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/cdktf-cli') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf-cli
package: "cdktf-cli"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
cdktf:
name: "cdktf Unit Tests"
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/cdktf') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.6.5"]
with:
concurrency_group_prefix: pr-cdktf
package: "cdktf"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Unit Tests - PR - Result
needs:
[
all_unit_tests,
cdktf,
cdktf_cli,
cdktf_provider_generator,
cdktf_hcl2json,
cdktf_hcl2cdk,
cdktf_commons,
cdktf_cli_core,
]
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}