fix: race condition on connIdIssued in Client.request #1666
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: Go | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| timeout-minutes: 20 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| go-version: [ stable, oldstable] | |
| # windows-latest removed for now: known issues with file handles to | |
| # resolved. could set classic file io mode. | |
| os: [macos-latest, ubuntu-latest] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: brew install macfuse fuse-t && echo 'FUSE_FORCE_BACKEND=fuse-t' >> $GITHUB_ENV | |
| if: matrix.os == 'macos-latest' | |
| - run: | | |
| sudo apt update | |
| sudo apt install -y fuse | |
| if: matrix.os == 'ubuntu-latest' | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install just | |
| run: cargo install just | |
| - name: Build possum | |
| run: | | |
| cd storage/possum/lib | |
| cargo build --lib | |
| # Separate to remove downloading spam and possible caching improvement. | |
| - run: go mod download | |
| - run: just test | |
| # Test on 386 for atomic alignment and other bad 64-bit assumptions | |
| - if: matrix.os != 'macos-latest' | |
| run: GOARCH=386 go test -run @ ./... | |
| - name: Some packages compile for WebAssembly | |
| run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/... | |
| - name: Test global installability | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| # Create isolated environment | |
| TMPDIR=$(mktemp -d) | |
| cd "$TMPDIR" | |
| # Init a dummy module to avoid any local go.mod influence | |
| go mod init dummy | |
| # This should succeed if your module is properly published | |
| go install github.com/anacrolix/torrent/cmd/torrent@${{ github.ref_name }} | |
| # Verify it runs | |
| $(go env GOPATH)/bin/torrent version |