feat: add Helm lifecycle reporting and integration coverage #17603
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: Pre-commit | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| env: | |
| # Released binary used by hooks that invoke Atmos. This must not build source | |
| # during pre-commit, which runs in a worktree-sensitive lifecycle event. | |
| ATMOS_BOOTSTRAP_VERSION: "1.224.1" | |
| # Ensure pre-commit uses the right Python version | |
| PYTHON_VERSION: "3.11" | |
| # Skip hooks that are already running in other CI jobs to avoid redundant work | |
| # go-build-mod: Already runs in test.yml build job | |
| # golangci-lint: Already runs in codeql.yml lint-golangci job | |
| # lintroller: Already runs in codeql.yml lint-golangci job (via custom-gcl binary) | |
| SKIP: go-build-mod,golangci-lint,lintroller | |
| # Use pipe fallback so transient proxy.golang.org 5xx errors during | |
| # `go mod download` fall back to direct module fetches. | |
| GOPROXY: "https://proxy.golang.org|direct" | |
| jobs: | |
| pre-commit: | |
| name: Run pre-commit hooks | |
| runs-on: | |
| - runs-on=${{github.run_id}} | |
| - runner=terraform | |
| - tag=atmos | |
| - extras=s3-cache | |
| - private=false | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| # Fetch full history for proper diff checking | |
| fetch-depth: 0 | |
| - name: Set up Atmos | |
| uses: ./.github/actions/setup-atmos-bootstrap | |
| with: | |
| atmos-version: ${{ env.ATMOS_BOOTSTRAP_VERSION }} | |
| - name: Set up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Go tools | |
| run: | | |
| # Install gofumpt for pre-commit. | |
| # Pin to the gofumpt bundled by golangci-lint v2.5.0 (the gofumpt formatter in | |
| # .golangci.yml) so the standalone hook and the linter stay in lockstep. Floating | |
| # @latest drifted to v0.10.0, which reformats v0.9.x-clean code and broke unrelated | |
| # files that fell into the PR diff range. | |
| go install mvdan.cc/gofumpt@v0.9.1 | |
| # Install golangci-lint v2 | |
| go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0 | |
| # Add Go bin to PATH | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Download Go module dependencies | |
| run: | | |
| # Pre-download dependencies to prevent go mod tidy from trying to fetch internal packages | |
| go mod download | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Run CloudPosse pre-commit action | |
| uses: cloudposse/github-action-pre-commit@ed9906221c8a4ee1dcb1e665da895998e0f7b396 # v4.1.0 | |
| with: | |
| # Run against files changed in the PR only | |
| # This prevents formatting/checking unrelated files | |
| extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref HEAD |