Skip to content

Commit

Permalink
focus on swarm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed May 18, 2022
1 parent 1b61f0e commit fc576d2
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,22 @@ jobs:
uses: ./.github/actions/go-test-setup
if: hashFiles('./.github/actions/go-test-setup') != ''
- name: Run tests
uses: protocol/[email protected]
with:
# Use -coverpkg=./..., so that we include cross-package coverage.
# If package ./A imports ./B, and ./A's tests also cover ./B,
# this means ./B's coverage will be significantly higher than 0%.
run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./...
- name: Run tests (32 bit)
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
uses: protocol/[email protected]
env:
GOARCH: 386
with:
run: |
export "PATH=${{ env.PATH_386 }}:$PATH"
go test -v ./...
- name: Run tests with race detector
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
uses: protocol/[email protected]
with:
run: go test -v -race ./...
# Use -coverpkg=./..., so that we include cross-package coverage.
# If package ./A imports ./B, and ./A's tests also cover ./B,
# this means ./B's coverage will be significantly higher than 0%.
run: |
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./p2p/net/swarm
- name: Collect coverage files
shell: bash
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
Expand Down

0 comments on commit fc576d2

Please sign in to comment.