| 1 |
name: Test |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- master |
| 8 |
- main |
| 9 |
paths-ignore: |
| 10 |
- "**/*.md" |
| 11 |
pull_request: |
| 12 |
paths-ignore: |
| 13 |
- "**/*.md" |
| 14 |
|
| 15 |
concurrency: |
| 16 |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} |
| 17 |
cancel-in-progress: true |
| 18 |
|
| 19 |
permissions: |
| 20 |
contents: read |
| 21 |
|
| 22 |
jobs: |
| 23 |
unit: |
| 24 |
strategy: |
| 25 |
matrix: |
| 26 |
go-version: [1.25.x, 1.26.x] |
| 27 |
platform: [blacksmith-4vcpu-ubuntu-2404, blacksmith-4vcpu-windows-2025, blacksmith-6vcpu-macos-latest] |
| 28 |
runs-on: ${{ matrix.platform }} |
| 29 |
timeout-minutes: 30 |
| 30 |
steps: |
| 31 |
- name: Fetch Repository |
| 32 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 33 |
|
| 34 |
- name: Install Go |
| 35 |
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| 36 |
with: |
| 37 |
go-version: ${{ matrix.go-version }} |
| 38 |
check-latest: true |
| 39 |
|
| 40 |
- name: Test |
| 41 |
uses: gofiber/.github/.github/actions/gotestsum@main |
| 42 |
with: |
| 43 |
packages: ./... |
| 44 |
rerun-fails: '2' |
| 45 |
args: -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on |
| 46 |
|
| 47 |
- name: Upload coverage reports to Codecov |
| 48 |
if: ${{ runner.os == 'Linux' && matrix.go-version == '1.25.x' }} |
| 49 |
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 |
| 50 |
with: |
| 51 |
token: ${{ secrets.CODECOV_TOKEN }} |
| 52 |
flags: unittests |
| 53 |
slug: gofiber/schema |
| 54 |
verbose: true |
| 55 |
|
| 56 |
repeated: |
| 57 |
# single package with barely any t.Parallel(), so this is effectively serial: |
| 58 |
# per-core speed is what helps here, not core count |
| 59 |
runs-on: blacksmith-2vcpu-ubuntu-2404 |
| 60 |
timeout-minutes: 30 |
| 61 |
steps: |
| 62 |
- name: Fetch Repository |
| 63 |
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 64 |
|
| 65 |
- name: Install Go |
| 66 |
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 |
| 67 |
with: |
| 68 |
go-version: stable |
| 69 |
|
| 70 |
- name: Test |
| 71 |
uses: gofiber/.github/.github/actions/gotestsum@main |
| 72 |
with: |
| 73 |
args: ./... -race -count=15 -shuffle=on |