mirror of https://github.com/gofiber/fiber.git
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
paths:
|
|
- "**"
|
|
- "!docs/**"
|
|
- "!**.md"
|
|
pull_request:
|
|
paths:
|
|
- "**"
|
|
- "!docs/**"
|
|
- "!**.md"
|
|
|
|
jobs:
|
|
unit:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.21.x, 1.22.x]
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
|
|
runs-on: ${{ matrix.platform }}
|
|
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=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' }}
|
|
uses: codecov/codecov-action@v4.5.0
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
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
|