-
Notifications
You must be signed in to change notification settings - Fork 7
151 lines (126 loc) · 3.85 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Besom build and test
on:
push:
branches: [ 'main', 'develop' ]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'templates/**'
- 'proto/**'
- 'experimental/**'
- 'website/**'
pull_request:
branches: [ 'main', 'develop' ]
types: [ 'opened', 'reopened', 'synchronize' ]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'templates/**'
- 'proto/**'
- 'experimental/**'
- 'website/**'
env:
PULUMI_CONFIG_PASSPHRASE: 'passphrase'
jobs:
# TODO uncomment when codegen is fixed
# format:
# runs-on: "ubuntu-latest"
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: coursier/[email protected]
# - uses: VirtusLab/[email protected]
# - name: Scalafmt check # TODO exit 1
# run: |
# scala-cli fmt . --check -F --respect-project-filters || (
# echo "To format code run"
# echo " scala-cli fmt ."
# exit 0
# )
# we need: scala-cli, protoc, go, just, pulumi, java
build:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
with:
just-version: '1.14.0' # just for sanity
- uses: pulumi/actions@v4
with:
pulumi-version: '3.86.0'
- uses: coursier/[email protected]
- uses: VirtusLab/[email protected]
with:
jvm: graalvm-java11:22.3.1
apps: sbt
power: true
- uses: arduino/setup-protoc@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Clean workspace
run: just clean-all
- name: Compile everything
run: just compile-all
- name: Test core SDK
run: just test-sdk
- name: Publish compiler plugin
run: just publish-local-compiler-plugin
- name: Test language plugin
run: just test-language-plugin
- name: Cross-package language plugin
run: just package-language-plugins-all
- name: Install language plugin
run: just install-language-plugin
- name: Login in to pulumi
run: pulumi login --local
- name: Test compiler plugin
run: just test-compiler-plugin
- name: Login in to pulumi
run: pulumi login --local
- name: Generate random provider
run: just generate-provider-sdk random 4.13.2
- name: Publish random provider
run: just publish-local-provider-sdk random 4.13.2
- name: Run random tests
uses: pulumi/actions@v4
with:
command: up
work-dir: integration-tests/src/test/resources/random-example
stack-name: test
upsert: true
env:
PULUMI_ENABLE_TRACE_LOGGING_TO_FILE: true
- name: Upload logs if failed or cancelled
if: failure() || cancelled()
uses: actions/upload-artifact@v2
with:
name: random-tests-debug-logs-${{ github.sha }}-${{ github.run_number }}
path: integration-tests/src/test/resources/random-example/logs/
- name: Generate purrl provider
run: just generate-provider-sdk purrl 0.4.1
- name: Publish purrl provider
run: just publish-local-provider-sdk purrl 0.4.1
- name: Run purrl tests
uses: pulumi/actions@v4
with:
command: up
work-dir: integration-tests/src/test/resources/purrl-example
stack-name: test
upsert: true
- name: Generate tls provider
run: just generate-provider-sdk tls 4.10.0
- name: Publish tls provider
run: just publish-local-provider-sdk tls 4.10.0
- name: Run tls tests
uses: pulumi/actions@v4
with:
command: up
work-dir: integration-tests/src/test/resources/tls-example
stack-name: test
upsert: true