Skip to content

Commit

Permalink
add github ci step for testing generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
aschepis committed May 1, 2024
1 parent 48160b4 commit dee4fc9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ jobs:
working-directory: provider
args: -c ../.golangci.yml

test_generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21
cache: false
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
tag: v0.0.46
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v5
with:
pulumi-version: ^3
- name: Lint Provider
run: make test_generate

test:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ tfgen: install_plugins
PATH=${PWD}/.pulumi/bin:$$PATH PULUMI_CONVERT=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION) go generate cmd/$(PROVIDER)/main.go)

.PHONY: test-generate
.PHONY: test_generate
test-generate: provider
@echo "--- :golang: go mod tidy"
(cd provider && go mod tidy)
Expand Down

0 comments on commit dee4fc9

Please sign in to comment.