Skip to content

Commit a18e8a8

Browse files
authored
feat: Add support for longtests during CI (#3054)
* Add support for longtests during CI * Reduce count from 25 to 15
1 parent 0400af6 commit a18e8a8

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Test
2+
13
on:
24
push:
35
branches:
@@ -13,9 +15,8 @@ on:
1315
- "!docs/**"
1416
- "!**.md"
1517

16-
name: Test
1718
jobs:
18-
Build:
19+
unit:
1920
strategy:
2021
matrix:
2122
go-version: [1.21.x, 1.22.x]
@@ -30,11 +31,8 @@ jobs:
3031
with:
3132
go-version: ${{ matrix.go-version }}
3233

33-
- name: Install gotestsum
34-
run: go install gotest.tools/[email protected]
35-
3634
- name: Test
37-
run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on
35+
run: go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on
3836

3937
- name: Upload coverage reports to Codecov
4038
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x' }}
@@ -44,3 +42,21 @@ jobs:
4442
file: ./coverage.txt
4543
flags: unittests
4644
slug: gofiber/fiber
45+
46+
repeated:
47+
needs: unit
48+
strategy:
49+
matrix:
50+
go-version: [1.21.x, 1.22.x]
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Fetch Repository
54+
uses: actions/checkout@v4
55+
56+
- name: Install Go
57+
uses: actions/setup-go@v5
58+
with:
59+
go-version: ${{ matrix.go-version }}
60+
61+
- name: Test
62+
run: go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=15 -shuffle=on

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test:
4040
## longtest: 🚦 Execute all tests 10x
4141
.PHONY: longtest
4242
longtest:
43-
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=10 -shuffle=on
43+
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=15 -shuffle=on
4444

4545
## tidy: 📌 Clean and tidy dependencies
4646
.PHONY: tidy

0 commit comments

Comments
 (0)