Cactus pollinate #28
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: | |
| permissions: | |
| contents: read | |
| # cactus uses Go's built-in crypto/mldsa and declares `go 1.27` in | |
| # go.mod, so it must be built with a Go 1.27 toolchain. 1.27 has not had | |
| # a final release yet, so CI pins the newest release candidate; bump | |
| # GO_VERSION as later RCs appear and set it to '1.27' once 1.27.0 ships. | |
| # GOTOOLCHAIN=local keeps the go command from downloading a different | |
| # toolchain behind our backs -- the RC satisfies the go.mod requirement | |
| # on its own. | |
| env: | |
| GO_VERSION: '1.27.0-rc.2' | |
| GOTOOLCHAIN: local | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # setup-go caches the module and build caches itself, keyed on | |
| # go.sum, so no separate actions/cache step is needed. | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Toolchain version | |
| run: go version | |
| - name: Check gofmt | |
| run: | | |
| fmtout=$(gofmt -l .) | |
| if [ -n "$fmtout" ]; then | |
| echo "These files are not gofmt-clean:" | |
| echo "$fmtout" | |
| exit 1 | |
| fi | |
| # The Makefile defaults to gotip for local development; CI has a | |
| # real 1.27 toolchain on PATH as `go`. | |
| - name: Vet | |
| run: make GO=go vet | |
| - name: Build | |
| run: make GO=go build | |
| - name: Test (race) | |
| run: go test -race -count=1 ./... | |
| - name: Integration tests (race) | |
| run: make GO=go integration | |
| # The stress test is build-tagged, so the steps above never compile | |
| # it. Vet it here so a break is caught on the pull request rather | |
| # than by the nightly Stress workflow. Running it is that | |
| # workflow's job. | |
| - name: Vet stress-tagged tests | |
| run: go vet -tags=stress ./integration/... |