ソースを参照

ci: run Go tests with `-shuffle=on` (#7370)

Joe Chen 2 年 前
コミット
689e71ff2c
1 ファイル変更5 行追加5 行削除
  1. 5 5
      .github/workflows/go.yml

+ 5 - 5
.github/workflows/go.yml

@@ -68,7 +68,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Run tests with coverage
-        run: go test -v -race -coverprofile=coverage -covermode=atomic ./...
+        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./...
       - name: Upload coverage report to Codecov
         uses: codecov/[email protected]
         with:
@@ -108,7 +108,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Run tests with coverage
-        run: go test -v -coverprofile=coverage -covermode=atomic ./...
+        run: go test -shuffle=on -v -coverprofile=coverage -covermode=atomic ./...
       - name: Upload coverage report to Codecov
         uses: codecov/[email protected]
         with:
@@ -158,7 +158,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Run tests with coverage
-        run: go test -v -race -coverprofile=coverage -covermode=atomic ./internal/db/...
+        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./internal/db/...
         env:
           GOGS_DATABASE_TYPE: postgres
           PGPORT: 5432
@@ -184,7 +184,7 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Run tests with coverage
-        run: go test -v -race -coverprofile=coverage -covermode=atomic ./internal/db/...
+        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./internal/db/...
         env:
           GOGS_DATABASE_TYPE: mysql
           MYSQL_USER: root
@@ -207,6 +207,6 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v2
       - name: Run tests with coverage
-        run: go test -v -race -parallel=1 -coverprofile=coverage -covermode=atomic ./internal/db/...
+        run: go test -shuffle=on -v -race -parallel=1 -coverprofile=coverage -covermode=atomic ./internal/db/...
         env:
           GOGS_DATABASE_TYPE: sqlite