Skip to content

Commit

Permalink
[ignore] Added generated code diff check
Browse files Browse the repository at this point in the history
  • Loading branch information
samiib committed May 3, 2024
1 parent 51d4ff1 commit 806663d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,24 @@ jobs:
- name: Build
run: go build -v

# diff:
# name: Check Generated Code Difference
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version-file: 'go.mod'
# - name: Generate provider code
# run: go generate
# - name: Check generated code for diffs
# run: git diff --exit-code
diff:
name: Check Generated Code Difference
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Generate provider code
run: go generate
env:
GOFLAGS: -mod=mod
- name: Check generated code for diffs
run: git diff --exit-code

acceptance:
name: Acceptance Tests
needs: [build]
needs: [build, diff]
runs-on: ubuntu-latest
env:
ACI_USERNAME: 'ansible_github_ci'
Expand Down
2 changes: 1 addition & 1 deletion gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const (
definitionsPath = "./gen/definitions"
metaPath = "./gen/meta"
templatePath = "./gen/templates"
testVarsPath = "./gen/testVars"
testVarsPath = "./gen/testvars"
providerExamplePath = "./examples/provider/provider.tf"
resourcesExamplesPath = "./examples/resources"
datasourcesExamplesPath = "./examples/data-sources"
Expand Down

0 comments on commit 806663d

Please sign in to comment.