From cc3d22224088168ec2888e4512f1f8680f9f5f57 Mon Sep 17 00:00:00 2001 From: michalbil Date: Tue, 8 Oct 2024 13:33:10 +0200 Subject: [PATCH 1/4] ci: Unpin official actions --- .github/workflows/pr_ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 1da06ded..d5052158 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -58,10 +58,10 @@ jobs: name: Generate code runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5 + uses: actions/setup-go@v5 with: go-version: "1.22" @@ -83,8 +83,8 @@ jobs: run: | echo "artifacts_path=$(realpath ../generated/pango)" >> $GITHUB_ENV - - name: Upload generated files for PANGO SDK - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 + - name: Upload generated files for pango SDK + uses: actions/upload-artifact@v4 with: name: generated-pango path: | From ba4c7b93a1a666dbe8a4159b74574ee0c75dbf90 Mon Sep 17 00:00:00 2001 From: michalbil Date: Tue, 8 Oct 2024 13:35:16 +0200 Subject: [PATCH 2/4] ci: Add tests execution --- .github/workflows/pr_ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index d5052158..4753cdd2 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -68,16 +68,23 @@ jobs: - name: Download Go dependencies run: go get ./... && go mod tidy + - name: Test codegen + run: go test -v ./... + - name: Build codegen run: go build -v ./... - name: Execute codegen for PANGO SDK run: go run cmd/codegen/main.go -t mksdk - - name: List generated PANGO SDK files + - name: Test generated code run: | - echo "Generated Files:" - ls ../generated/pango + for dir in $(ls ../generated); do + echo "Run tests for ${dir}" + cd ../generated/${dir} + go test -v ./... + cd - + done - name: Workaround actions/upload-artifact#176 run: | From 2d5bc2e9986095f9f81a8e4d87f2300fb8881ef1 Mon Sep 17 00:00:00 2001 From: michalbil Date: Tue, 8 Oct 2024 13:36:05 +0200 Subject: [PATCH 3/4] ci: Add provider coverage --- .github/workflows/pr_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 4753cdd2..f1c6d5c5 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -74,8 +74,8 @@ jobs: - name: Build codegen run: go build -v ./... - - name: Execute codegen for PANGO SDK - run: go run cmd/codegen/main.go -t mksdk + - name: Execute codegen for all targets + run: go run cmd/codegen/main.go - name: Test generated code run: | From 23aa8f12fd08993bbf4e3c42324561fb8a2f3bd9 Mon Sep 17 00:00:00 2001 From: Krzysztof Klimonda Date: Wed, 6 Nov 2024 15:35:09 +0100 Subject: [PATCH 4/4] Fix terraform SDK manager unit tests --- assets/terraform/internal/manager/uuid_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/terraform/internal/manager/uuid_test.go b/assets/terraform/internal/manager/uuid_test.go index 7c3634dc..7e3d07f5 100644 --- a/assets/terraform/internal/manager/uuid_test.go +++ b/assets/terraform/internal/manager/uuid_test.go @@ -160,7 +160,7 @@ var _ = Describe("Server", func() { manager = sdkmanager.NewUuidObjectManager(client, service, MockUuidSpecifier, MockUuidMatcher) }) - FIt("should move the entries in order", func() { + It("should move the entries in order", func() { entries := []*MockUuidObject{{Name: "1", Value: "A"}, {Name: "3", Value: "C"}, {Name: "2", Value: "B"}} processed, err := manager.ReadMany(ctx, location, entries, sdkmanager.NonExhaustive) @@ -173,7 +173,7 @@ var _ = Describe("Server", func() { Expect(err).ToNot(HaveOccurred()) Expect(processed).To(HaveLen(3)) - Expect(processed).NotTo(Equal(entries)) + Expect(processed).To(Equal(entries)) }) }) })