Skip to content

Commit

Permalink
ci: 单协程运行测试
Browse files Browse the repository at this point in the history
防止测试用例创建同名的表导致出错
  • Loading branch information
caixw committed Apr 22, 2024
1 parent 295ddd1 commit 5a6fa3c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: go vet -v ./...

- name: Test
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=mariadb,mysql
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=mariadb,mysql -p=1 -parallel=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: go vet -v ./...

- name: Test
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=mysql,mysql
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=mysql,mysql -p=1 -parallel=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: go vet -v ./...

- name: Test
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=postgres,postgres
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=postgres,postgres -p=1 -parallel=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: go vet -v ./...

- name: Test
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=sqlite3,sqlite
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=sqlite3,sqlite -p=1 -parallel=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlite3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: go vet -v ./...

- name: Test
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=sqlite3,sqlite3
run: go test -p=1 ./... -test.coverprofile=coverage.txt -covermode=atomic -dbs=sqlite3,sqlite3 -p=1 -parallel=1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit 5a6fa3c

Please sign in to comment.