ci(release): drop NODE_AUTH_TOKEN now that the secret is gone (#36) #131
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 | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| # Skipped on windows: gofmt's output is platform-independent and the | |
| # same bytes are already checked on ubuntu/macos, so running it a third | |
| # time adds no coverage. (.gitattributes now forces an LF checkout | |
| # everywhere, so this is no longer about CRLF false positives.) | |
| - name: gofmt | |
| if: runner.os != 'Windows' | |
| run: | | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "These files are not gofmt-clean:" | |
| echo "$unformatted" | |
| exit 1 | |
| fi | |
| - name: go vet | |
| run: go vet ./... | |
| # ubuntu-latest ships google-chrome-stable, so the live-Chrome integration | |
| # test runs there; on macOS (no Chrome) it skips itself gracefully. | |
| - name: Test | |
| if: runner.os != 'Windows' | |
| run: go test -race ./... | |
| # windows-latest has no cgo toolchain wired for -race, and no Chrome to | |
| # run the live suite against, so it gets the short suite only. | |
| - name: Test (short) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: go test -short ./... | |
| - name: Build | |
| run: go build ./... | |
| # The npm shim is the install path for `npx @sanketsudake/chrome-cdp`, and | |
| # its tests are the only guard on the postinstall script. They used to run | |
| # in the release job alone — immediately before `npm publish` — so a | |
| # regression stayed invisible through review and surfaced mid-release: | |
| # 0.3.0 shipped a postinstall that died on every install while the Go CI | |
| # above was green. Running them here makes an installer break a red PR. | |
| # | |
| # ubuntu-only on purpose: these are pure-function and subprocess tests that | |
| # take the platform as a parameter (assetName covers win32), so a matrix | |
| # would re-run identical assertions. | |
| npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Test the npm installer shim | |
| run: cd npm && node --test |