azurerm_kubernetes_flux_configuration - Updating fluxconfiguration sdk #34721
Workflow file for this run
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: Unit Tests | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| types: ['opened', 'synchronize'] | |
| paths: | |
| - '.github/workflows/unit-test.yaml' | |
| - 'go.mod' | |
| - 'vendor/**' | |
| - '**.go' | |
| # Run this workflow on merges that change go.sum on the default branch. The | |
| # intention is to save a new Go module dependency cache for the default | |
| # branch. This cache is then available to all workflow runs. | |
| # | |
| # Reference: https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching?search-overlay-input=github+action+cache+limit+increase&search-overlay-ask-ai=true#restrictions-for-accessing-a-cache | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/unit-test.yaml' | |
| - 'go.mod' | |
| concurrency: | |
| # Some events do not have a `head_ref`. Fall back to `run_id`. | |
| # Reference: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-using-a-fallback-value-1 | |
| group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}' | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: custom-linux-xl | |
| if: github.repository_owner == 'hashicorp' | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| # TODO: go.mod will be the default in a future release of setup-go https://github.com/actions/setup-go/pull/705 | |
| cache-dependency-path: go.mod | |
| go-version-file: ./.go-version | |
| - name: '[Diagnostic] Report Go module cache and build cache disk usage' | |
| run: 'du -h -d 0 $(go env GOMODCACHE) $(go env GOCACHE) || true' | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@v1.13.0 | |
| - run: bash scripts/gogetcookie.sh | |
| - name: fmtcheck | |
| run: make fmtcheck | |
| - name: Run tests | |
| run: | | |
| gotestsum \ | |
| --format pkgname-and-test-fails \ | |
| --format-hide-empty-pkg -- \ | |
| -timeout=30s \ | |
| -parallel=32 \ | |
| -run='^Test[^A]|^TestA[^c]|^TestAc[^c]' \ | |
| ./... | |
| - name: Guidance on failure | |
| if: failure() | |
| run: | | |
| echo "::error::Unit Tests failed." | |
| echo "" | |
| echo "Run 'make test' locally to reproduce and fix the failing tests." | |
| echo "If you have added a new resource or data source, ensure you have added" | |
| echo "the corresponding unit tests. Check the test output above for details" | |
| echo "on which tests failed and why." | |
| save-artifacts-on-fail: | |
| needs: test | |
| if: ${{ failure() }} | |
| uses: ./.github/workflows/save-artifacts.yaml | |
| comment-on-fail: | |
| needs: test | |
| if: ${{ failure() }} | |
| uses: ./.github/workflows/comment-failure.yaml |