Skip to content

Commit 1f891fd

Browse files
separate sdk workflow
1 parent e9d22bb commit 1f891fd

File tree

6 files changed

+98
-28
lines changed

6 files changed

+98
-28
lines changed

.github/workflows/sdks.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
on:
2+
pull_request:
3+
paths-ignore:
4+
- docs
5+
- .devcontainer
6+
- examples
7+
8+
jobs:
9+
build_sdks:
10+
name: Build SDKs
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
dotnetversion:
16+
- 6.0.x
17+
goversion:
18+
- 1.21.x
19+
nodeversion:
20+
- 18.x
21+
pythonversion:
22+
- "3.9"
23+
# javaversion:
24+
# - "11"
25+
language:
26+
- nodejs
27+
- python
28+
- dotnet
29+
- go
30+
# - java
31+
32+
steps:
33+
- name: Checkout Repo
34+
uses: actions/checkout@v2
35+
- name: Unshallow clone for tags
36+
run: git fetch --prune --unshallow --tags
37+
38+
- name: Install Go
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version: ${{matrix.goversion}}
42+
43+
- name: Install pulumictl
44+
uses: jaxxstorm/[email protected]
45+
with:
46+
repo: pulumi/pulumictl
47+
48+
- name: Install pulumi
49+
uses: pulumi/actions@v5
50+
51+
- if: ${{ matrix.language == 'nodejs'}}
52+
name: Setup Node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{matrix.nodeversion}}
56+
registry-url: https://registry.npmjs.org
57+
58+
- if: ${{ matrix.language == 'dotnet'}}
59+
name: Setup DotNet
60+
uses: actions/setup-dotnet@v4
61+
with:
62+
dotnet-version: ${{matrix.dotnetversion}}
63+
64+
- if: ${{ matrix.language == 'python'}}
65+
name: Setup Python
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: ${{matrix.pythonversion}}
69+
70+
- if: ${{ matrix.language == 'java'}}
71+
name: Setup Java
72+
uses: actions/setup-java@v4
73+
with:
74+
cache: gradle
75+
distribution: temurin
76+
java-version: ${{matrix.javaversion}}
77+
78+
- name: Build SDK
79+
run: make ${{ matrix.language }}_sdk
80+
81+
- name: Build Example
82+
run: make ${{ matrix.language }}_example
83+
84+
- name: Check worktree clean
85+
run: |
86+
git update-index -q --refresh
87+
if ! git diff-files --quiet; then
88+
>&2 echo "error: working tree is not clean, aborting!"
89+
git status
90+
git diff
91+
exit 1
92+
fi

.github/workflows/test.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Install Go
1111
uses: actions/setup-go@v5
1212
with:
13-
go-version: ${{matrix.goversion}}
13+
go-version: 1.22.x
1414
- name: Install pulumictl
1515
uses: jaxxstorm/[email protected]
1616
with:
@@ -21,32 +21,10 @@ jobs:
2121
run: git fetch --prune --unshallow --tags
2222
- run: make provider
2323
- run: make test
24+
- run: make schema && git diff --exit-code -- provider/cmd/pulumi-resource-defang/schema.json
2425
- name: golangci-lint
2526
uses: golangci/golangci-lint-action@v6
2627
with:
2728
version: v1.64
2829
args: --timeout=5m --config=.golangci.yaml provider
29-
- name: Ensure docs are up-to-date
30-
run: |
31-
make docs
32-
git diff --quiet -- ./docs
33-
- name: Ensure examples are up-to-date
34-
run: |
35-
make examples
36-
git diff --quiet -- ./examples
37-
- name: Ensure schema is up-to-date
38-
run: |
39-
make schema
40-
git diff --quiet -- provider/cmd/pulumi-resource-defang/schema-defang.json
41-
- name: Ensure sdks are up-to-date
42-
run: |
43-
make sdks
44-
git diff --quiet -- ./sdks
4530

46-
strategy:
47-
fail-fast: true
48-
matrix:
49-
goversion:
50-
# - 1.18.x
51-
- 1.22.x
52-

examples/dotnet/provider-defang.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88
<ItemGroup>
99
<PackageReference Include="Pulumi" Version="3.*" />
10-
<PackageReference Include="Pulumi.Defang" Version="1.1.0-alpha.1741220010+8d69e1ac" />
10+
<PackageReference Include="Pulumi.Defang" Version="1.1.0-alpha.1741220968+0411d9f3" />
1111
</ItemGroup>
1212

1313
</Project>

examples/go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ go 1.20
44

55
require (
66
github.com/pulumi/pulumi/sdk/v3 v3.30.0
7-
example.com/pulumi-defang/sdk v1.1.0-alpha.1741220010+8d69e1ac
7+
example.com/pulumi-defang/sdk v1.1.0-alpha.1741220968+0411d9f3
88
)

examples/nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"dependencies": {
77
"typescript": "^4.0.0",
88
"@pulumi/pulumi": "^3.0.0",
9-
"@defang-io/pulumi-defang": "1.1.0-alpha.1741220010+8d69e1ac"
9+
"@defang-io/pulumi-defang": "1.1.0-alpha.1741220968+0411d9f3"
1010
}
1111
}

examples/python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pulumi-defang==1.1.0-alpha.1741220010+8d69e1ac
1+
pulumi-defang==1.1.0-alpha.1741220968+0411d9f3
22
pulumi>=3.0.0,<4.0.0

0 commit comments

Comments
 (0)