-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (127 loc) · 3.83 KB
/
Copy pathpulumi-ci.yml
File metadata and controls
146 lines (127 loc) · 3.83 KB
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
---
name: Pulumi CI
on:
push:
branches:
- main
paths:
- "pulumi/**"
- "internal/**"
- "go.mod"
- "go.sum"
- ".github/workflows/pulumi-*.yml"
- ".golangci.yml"
pull_request:
branches:
- main
paths:
- "pulumi/**"
- "internal/**"
- "go.mod"
- "go.sum"
- ".github/workflows/pulumi-*.yml"
- ".golangci.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel in-progress PR runs on new pushes; let main runs finish to
# preserve post-merge signal history.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
prerequisites:
name: Prerequisites
uses: ./.github/workflows/pulumi-prerequisites.yml
lint:
name: Lint
# Depend on prerequisites so lint auto-skips on schema drift failures.
needs: prerequisites
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: pulumi/provider/go.mod
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v7
with:
working-directory: pulumi/provider
args: --config ../../.golangci.yml ./...
# Provider binary build is handled by pulumi-release.yml on tag push.
# A fast goreleaser config check catches syntax errors without a full build.
goreleaser_check:
name: GoReleaser Config Check
needs: prerequisites
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate goreleaser config
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
workdir: pulumi
args: check --config .goreleaser.pulumi.yml
generate_sdk_python:
name: Generate Python SDK
needs: prerequisites
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: pulumi/provider/go.mod
cache: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Download schema artifacts
uses: actions/download-artifact@v4
with:
pattern: "schema*"
path: pulumi/provider/cmd/pulumi-resource-mica/
merge-multiple: true
- name: Download bridge-metadata artifact
uses: actions/download-artifact@v4
with:
name: bridge-metadata
path: pulumi/provider/cmd/pulumi-resource-mica/
# SKIP_TFGEN=1 + _from_schema targets consume the downloaded schema
# instead of re-running the tfgen schema subcommand.
- name: Test Python SDK build (schema pre-fetched)
working-directory: pulumi
run: make SKIP_TFGEN=1 test_python_sdk_from_schema
generate_sdk_go:
name: Generate Go SDK
needs: prerequisites
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: pulumi/provider/go.mod
cache: true
- name: Download schema artifacts
uses: actions/download-artifact@v4
with:
pattern: "schema*"
path: pulumi/provider/cmd/pulumi-resource-mica/
merge-multiple: true
- name: Download bridge-metadata artifact
uses: actions/download-artifact@v4
with:
name: bridge-metadata
path: pulumi/provider/cmd/pulumi-resource-mica/
- name: Test Go SDK build (schema pre-fetched)
working-directory: pulumi
run: make SKIP_TFGEN=1 test_go_sdk_from_schema