feat(web): edit flow returns to the trail #149
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Default every job to a read-only token; jobs opt in to extra scopes. | |
| permissions: | |
| contents: read | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| # dorny/paths-filter@v3 calls the Pulls.listFiles GitHub API on | |
| # pull_request events to compute the diff; grant the two scopes the | |
| # action needs at the job level (see the demarkus repo's ci.yml for | |
| # the restricted-default-token backstory). | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| app: ${{ steps.filter.outputs.app }} | |
| charts: ${{ steps.filter.outputs.charts }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 | |
| id: filter | |
| with: | |
| filters: | | |
| app: | |
| - 'cmd/**' | |
| - 'internal/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.goreleaser.yml' | |
| - 'Dockerfile' | |
| charts: | |
| - 'deploy/helm/**' | |
| test-app: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.app == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: "1.26" | |
| - uses: golangci/golangci-lint-action@9fae48acfc02a90574d7c304a1758ef9895495fa # v7 | |
| with: | |
| version: v2.9.0 | |
| - name: Test | |
| run: go test ./... | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Build | |
| run: go build -o /dev/null ./cmd/demarkus-library | |
| - name: GoReleaser config check | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 | |
| with: | |
| distribution: goreleaser-pro | |
| # Bounded range, not `latest` — keeps the binary from drifting | |
| # majors while still picking up v2 patch releases. | |
| version: "~> v2" | |
| args: check | |
| env: | |
| GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | |
| test-charts: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.charts == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4 | |
| with: | |
| version: v3.13.2 | |
| - name: Install helm-unittest | |
| # helm-unittest v0.6.2's plugin-install hook fails on checksum | |
| # validation ("no properly formatted SHA checksum lines found"). The | |
| # release tarball already carries plugin.yaml + the untt binary, so | |
| # extract it straight into the helm plugins dir — helm discovers the | |
| # plugin with no install hook (and no broken checksum step). | |
| run: | | |
| HELM_PLUGINS="$(helm env HELM_PLUGINS)" | |
| mkdir -p "$HELM_PLUGINS/helm-unittest" | |
| curl -fsSL https://github.com/helm-unittest/helm-unittest/releases/download/v0.6.2/helm-unittest-linux-amd64-0.6.2.tgz \ | |
| | tar -xz -C "$HELM_PLUGINS/helm-unittest" | |
| - name: Lint demarkus-library chart | |
| run: helm lint deploy/helm/demarkus-library | |
| - name: Unit test demarkus-library chart | |
| run: helm unittest deploy/helm/demarkus-library |