feat: Add support for longtests during CI (#3054)

* Add support for longtests during CI

* Reduce count from 25 to 15
pull/3055/head
Juan Calderon-Perez 2024-06-30 15:34:14 -04:00 committed by GitHub
parent 0400af6e47
commit a18e8a8967
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 7 deletions

View File

@ -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

View File

@ -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