]> go.fuhry.dev Git - fsnotify.git/commitdiff
Run tests with -parallel 1 in CI (#573)
authorMartin Tournoij <martin@arp242.net>
Thu, 13 Jul 2023 18:08:34 +0000 (20:08 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Jul 2023 18:08:34 +0000 (20:08 +0200)
This is only a little bit slower, and reduces the chance that we run out
of open file descriptors.

.circleci/config.yml
.cirrus.yml
.github/workflows/test.yml

index dac3af4675bd1baa9ab8edf9a698db4713ca178c..ed77df92712925d569874c04b9aee7d1c44ec509 100644 (file)
@@ -23,7 +23,7 @@ jobs:
           command: |
             uname -a
             go version
-            go test -race ./...
+            go test -parallel 1 -race ./...
 
   # iOS
   ios:
@@ -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
@@ -76,5 +76,5 @@ jobs:
   #           uname -a
   #           export PATH=/usr/local/go/bin:$PATH
   #           go version
-  #           go test -race ./...
+  #           go test -parallel 1 -race ./...
   #
index 89cd02257eeb6754d95e6373162dec719a99e9e9..d9a74da916ee4c14bbfcc89beef91df23d0c6a30 100644 (file)
@@ -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 ./...
index aeb6b5f24c52d6e4c791cfc1d04b640a24255b97..caa437c0ebccb623fb075786c2f7c9ebb5c9f670 100644 (file)
@@ -29,7 +29,7 @@ jobs:
 
       - name: test
         run: |
-          go test -race ./...
+          go test -parallel 1 -race ./...
 
   # Test gccgo
   testgcc:
@@ -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
@@ -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.
   #
@@ -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:
@@ -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:
@@ -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:
@@ -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