Skip to content

Commit

Permalink
Run tests with -parallel 1 in CI (#573)
Browse files Browse the repository at this point in the history
This is only a little bit slower, and reduces the chance that we run out
of open file descriptors.
  • Loading branch information
arp242 committed Jul 13, 2023
1 parent c35de00 commit 9342b6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
command: |
uname -a
go version
go test -race ./...
go test -parallel 1 -race ./...
# iOS
ios:
Expand All @@ -48,7 +48,7 @@ jobs:
export PATH=$PATH:/usr/local/Cellar/go/*/bin
uname -a
go version
go test -race ./...
go test -parallel 1 -race ./...
# This is just Linux x86_64; also need to get a Go with GOOS=android, but
# there aren't any pre-built versions of that on the Go site. Idk, disable for
Expand Down Expand Up @@ -76,5 +76,5 @@ jobs:
# uname -a
# export PATH=/usr/local/go/bin:$PATH
# go version
# go test -race ./...
# go test -parallel 1 -race ./...
#
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ freebsd_task:
# run tests as user "cirrus" instead of root
- pw useradd cirrus -m
- chown -R cirrus:cirrus .
- sudo -u cirrus go test -race ./...
- sudo -u cirrus go test -parallel 1 -race ./...
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: test
run: |
go test -race ./...
go test -parallel 1 -race ./...
# Test gccgo
testgcc:
Expand All @@ -42,7 +42,7 @@ jobs:
- name: test
run: |
sudo apt-get -y install gccgo-12
go-12 test ./...
go-12 test -parallel 1 ./...
# Test only the latest Go version on macOS; we use the macOS builders for BSD
# and illumos, and GitHub doesn't allow many of them to run concurrently. If
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:

- name: test
run: |
go test -race ./...
go test -parallel 1 -race ./...
# OpenBSD; no -race as the VM doesn't include the comp set.
#
Expand All @@ -91,7 +91,7 @@ jobs:
prepare: pkg_add go
run: |
useradd -mG wheel action
su action -c 'go test ./...'
su action -c 'go test -parallel 1 ./...'
# NetBSD
testNetBSD:
Expand All @@ -107,7 +107,7 @@ jobs:
# TODO: no -race for the same reason as OpenBSD (the timing; it does run).
run: |
useradd -mG wheel action
su action -c 'go120 test ./...'
su action -c 'go120 test -parallel 1 ./...'
# illumos
testillumos:
Expand All @@ -125,7 +125,7 @@ jobs:
useradd action
export GOCACHE=/tmp/go-cache
export GOPATH=/tmp/go-path
su action -c '/opt/ooce/go-1.19/bin/go test ./...'
su action -c '/opt/ooce/go-1.19/bin/go test -parallel 1 ./...'
# Older Debian 6, for old Linux kernels.
testDebian6:
Expand Down Expand Up @@ -160,5 +160,5 @@ jobs:
done
vagrant up
for t in *.test; do
vagrant ssh -c "/vagrant/$t"
vagrant ssh -c "/vagrant/$t -test.parallel 1"
done

0 comments on commit 9342b6d

Please sign in to comment.