docs: define checkout-native review contract (#377) #903
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: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| # Standard keyring tags for shipped builds: enable 1Password, disable passage. | |
| env: | |
| GOFLAGS: -tags=keyring_nopassage | |
| jobs: | |
| build-platform: # OS matrix — NOT a required check | |
| name: build (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/go-build@v1 | |
| with: | |
| go-version-file: go.mod | |
| build: # required aggregate — stable bare name | |
| needs: [build-platform] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Fail only on a real failure/cancellation; a skipped leg must NOT fail | |
| # the gate (which `== 'success'` would do). | |
| - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: echo "::error::a build-platform leg failed or was cancelled" && exit 1 | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/go-test@v1 | |
| with: | |
| go-version-file: go.mod | |
| test-no1password-optout: | |
| runs-on: ubuntu-latest | |
| env: | |
| GOFLAGS: -tags=keyring_nopassage,keyring_no1password | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/go-test@v1 | |
| with: | |
| go-version-file: go.mod | |
| static-smoke: | |
| runs-on: ubuntu-latest | |
| env: | |
| CGO_ENABLED: "0" | |
| GOFLAGS: -tags=keyring_nopassage | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/go-test@v1 | |
| with: | |
| go-version-file: go.mod | |
| target: test-static-smoke | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/go-lint@v1 | |
| with: | |
| go-version-file: go.mod | |
| identity-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: open-cli-collective/.github/actions/identity-check@v1 # distribution.md §8.2 | |
| pr-title: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: open-cli-collective/.github/actions/pr-title@v1 | |
| with: | |
| title: ${{ github.event.pull_request.title }} |