-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (77 loc) · 2.11 KB
/
push.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
# Enable the CI triggers when you are ready.
#
on:
workflow_dispatch:
# push:
# branches:
# - main
# paths-ignore:
# - "CHANGELOG.md"
# pull_request:
# branches:
# - main
# paths-ignore:
# - "CHANGELOG.md"
env:
GOLANG_CI_LINT_VERSION: v1.61.0
PROVIDER: "xyz"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $GOLANG_CI_LINT_VERSION
make lint
- name: Test
run: make test
assert-clean-tree:
name: Check if working tree is clean
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.14.0
with:
repo: pulumi/pulumictl
tag: "latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate schema and build SDKs
run: make gen generate_schema build
- name: Check worktree clean
run: |
git update-index -q --refresh
if ! git diff-files --quiet; then
>&2 echo "error: working tree is not clean, aborting!"
git status
git diff
exit 1
fi