Merge pull request #19 from platform9/feat/networking-qos #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| name: build / vet / fmt / unit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: build | |
| run: go build ./... | |
| - name: vet | |
| run: go vet ./... | |
| - name: gofmt | |
| run: | | |
| out="$(gofmt -l .)" | |
| if [ -n "$out" ]; then echo "gofmt needed on:"; echo "$out"; exit 1; fi | |
| - name: unit tests | |
| # Acceptance (TF_ACC) and live (PCD_LIVE_TEST) tests self-skip here. | |
| run: go test ./internal/... -timeout 120s | |
| lint: | |
| name: golangci-lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.12.2 | |
| docs: | |
| name: docs generate (smoke test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| # Generated docs are not committed; this verifies tfplugindocs still renders | |
| # cleanly from the schema descriptions (catches broken/missing descriptions). | |
| - name: generate docs | |
| run: go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name pcd | |
| terraform-fmt: | |
| name: terraform fmt (examples) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| - run: terraform fmt -check -recursive ./examples |