fix: _headers — serve /install as text/plain on Cloudflare Pages #1061
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, staging] | |
| pull_request: | |
| branches: [main, staging] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go-version: ['1.24.13'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: go test -race "-coverprofile=coverage.out" ./... | |
| - name: Build | |
| run: go build -v ./cmd/rampart | |
| - name: Policy check (standard) | |
| run: go run ./cmd/rampart policy check --config policies/standard.yaml | |
| - name: Policy check (paranoid) | |
| run: go run ./cmd/rampart policy check --config policies/paranoid.yaml | |
| - name: Policy check (yolo) | |
| run: go run ./cmd/rampart policy check --config policies/yolo.yaml | |
| - name: Vulnerability check | |
| continue-on-error: true | |
| run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./... | |
| - name: Benchmark | |
| if: runner.os != 'Windows' | |
| run: go test -bench=. -benchmem ./internal/engine/ ./internal/audit/ | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: coverage-${{ matrix.os }} | |
| path: coverage.out | |
| release-dry-run: | |
| name: goreleaser snapshot (cross-platform build check) | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version: '1.24.13' | |
| - name: GoReleaser snapshot (all platforms, no publish) | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| args: release --snapshot --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |