Debian Codegraph @

.github/workflows/test.yml

raw
1 on:
2 workflow_dispatch:
3 push:
4 branches:
5 - master
6 - main
7 paths:
8 - "**"
9 - "!docs/**"
10 - "!**.md"
11 pull_request:
12 paths:
13 - "**"
14 - "!docs/**"
15 - "!**.md"
16
17 name: Test
18
19 concurrency:
20 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
21 cancel-in-progress: true
22
23 permissions:
24 contents: read
25
26 jobs:
27 Build:
28 strategy:
29 matrix:
30 go-version: [1.26.x, 1.27.x]
31 platform: [blacksmith-4vcpu-ubuntu-2404, blacksmith-4vcpu-windows-2025, blacksmith-6vcpu-macos-latest]
32 runs-on: ${{ matrix.platform }}
33 timeout-minutes: 30
34 env:
35 # All GitHub-hosted amd64 runners provide AVX2; fail loudly if the
36 # simd package silently falls back to the portable tier (see
37 # Test_Accelerated). Non-amd64 builds (e.g. macos arm64) ignore it.
38 GOFIBER_SIMD_REQUIRE_AVX2: "1"
39 steps:
40 - name: Fetch Repository
41 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
42
43 - name: Install Go
44 uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
45 with:
46 go-version: ${{ matrix.go-version }}
47 check-latest: true
48
49 - name: Test
50 uses: gofiber/.github/.github/actions/gotestsum@main
51 with:
52 packages: ./...
53 rerun-fails: '2'
54 args: -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on
55
56 - name: Upload coverage reports to Codecov
57 if: ${{ runner.os == 'Linux' && matrix.go-version == '1.26.x' }}
58 uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
59 with:
60 token: ${{ secrets.CODECOV_TOKEN }}
61 files: ./coverage.txt
62 flags: unittests
63 slug: gofiber/utils