forked from getsentry/sentry-go
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.46 KB
/
Copy pathtest.yml
File metadata and controls
48 lines (48 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test
on:
push:
branches:
- master
- release/**
pull_request:
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Module Mode
runs-on: ${{ matrix.os }}-latest
env:
GO111MODULE: "on"
GOFLAGS: "-mod=readonly"
# The race detector adds considerable runtime overhead. To save time on
# pull requests, only run this step for a single job in the matrix. For
# all other workflow triggers (e.g., pushes to a release branch) run
# this step for the whole matrix.
RUN_RACE_TESTS: ${{ github.event_name != 'pull_request' || (matrix.go == '1.26' && matrix.os == 'ubuntu') }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go }}
cache-dependency-path: "**/go.sum"
- name: Tidy
run: make mod-tidy
if: ${{ matrix.go == '1.26' }}
- name: Build
run: make build
- name: Vet
run: make vet
- name: Test${{ env.RUN_RACE_TESTS == 'true' && ' (with race detection)' || '' }}
run: ${{ env.RUN_RACE_TESTS == 'true' && 'make test-race' || 'make test' }}
timeout-minutes: 15
strategy:
matrix:
go: ["1.26", "1.25"]
os: [ubuntu, windows, macos]
fail-fast: false