mirror of https://github.com/gofiber/fiber.git
feat: Add support for longtests during CI (#3054)
* Add support for longtests during CI * Reduce count from 25 to 15pull/3055/head
parent
0400af6e47
commit
a18e8a8967
|
@ -1,3 +1,5 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
@ -13,9 +15,8 @@ on:
|
|||
- "!docs/**"
|
||||
- "!**.md"
|
||||
|
||||
name: Test
|
||||
jobs:
|
||||
Build:
|
||||
unit:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x, 1.22.x]
|
||||
|
@ -30,11 +31,8 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install gotestsum
|
||||
run: go install gotest.tools/gotestsum@v1.11.0
|
||||
|
||||
- name: Test
|
||||
run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on
|
||||
run: go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x' }}
|
||||
|
@ -44,3 +42,21 @@ jobs:
|
|||
file: ./coverage.txt
|
||||
flags: unittests
|
||||
slug: gofiber/fiber
|
||||
|
||||
repeated:
|
||||
needs: unit
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.21.x, 1.22.x]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Test
|
||||
run: go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=15 -shuffle=on
|
||||
|
|
2
Makefile
2
Makefile
|
@ -40,7 +40,7 @@ test:
|
|||
## longtest: 🚦 Execute all tests 10x
|
||||
.PHONY: longtest
|
||||
longtest:
|
||||
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=10 -shuffle=on
|
||||
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=15 -shuffle=on
|
||||
|
||||
## tidy: 📌 Clean and tidy dependencies
|
||||
.PHONY: tidy
|
||||
|
|
Loading…
Reference in New Issue