Repository navigation
tailcat: support SSH local TCP forwarding to loopback #251
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: go build ./... | |
| # The cmd/tailcat e2e tests build a child tailcat binary with | |
| # the release build tags, which shares no build cache with the | |
| # untagged build above and takes about a minute cold, hence the | |
| # long timeout. actions/setup-go's caches keep warm runs fast. | |
| - run: go test -count=1 -timeout 600s ./... | |
| - run: go vet ./... | |
| tidy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| # Fails if go.mod/go.sum or the nix flake vendor hash in | |
| # flakehashes.json are stale; run `make tidy` to fix. | |
| - run: make tidy | |
| - run: git diff --name-only --exit-code | |
| release-tags: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| # Cross-build every GoReleaser release target with the release | |
| # build tags, using build-tags.txt the same way third-party | |
| # packagers do. (A test keeps that file in sync with | |
| # internal/buildtags.ReleaseTags; darwin builds are covered by | |
| # the macOS test job, whose e2e tests build a tagged binary.) | |
| - name: cross-build cmd/tailcat with release build tags | |
| run: | | |
| tags=$(cat build-tags.txt) | |
| echo "release tags: $tags" | |
| GOOS=linux GOARCH=amd64 go build -o /dev/null -tags "$tags" ./cmd/tailcat | |
| GOOS=linux GOARCH=arm64 go build -o /dev/null -tags "$tags" ./cmd/tailcat | |
| GOOS=linux GOARCH=arm GOARM=7 go build -o /dev/null -tags "$tags" ./cmd/tailcat | |
| GOOS=windows GOARCH=amd64 go build -o /dev/null -tags "$tags" ./cmd/tailcat | |
| GOOS=windows GOARCH=arm64 go build -o /dev/null -tags "$tags" ./cmd/tailcat | |
| cross: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| goos: [freebsd, openbsd] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| # README's install table lists the BSDs as supported by building | |
| # from source, so check that they at least keep cross-compiling: | |
| # everything untagged (the go install path), and cmd/tailcat with | |
| # the release build tags that INSTALL.md recommends to packagers. | |
| - run: go build ./... | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: amd64 | |
| - run: go build -o /dev/null -tags "$(cat build-tags.txt)" ./cmd/tailcat | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: amd64 | |
| wasm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: build js/wasm | |
| run: go build -o /tmp/tailcat-web.wasm ./web | |
| env: | |
| GOOS: js | |
| GOARCH: wasm | |
| - name: verify Google Chrome is available | |
| run: | | |
| which google-chrome | |
| google-chrome --version | |
| - name: headless browser tests | |
| run: go test ./web/ -v -count=1 -timeout 300s --run-headless-browser-tests |