forked from ogier/pflag
-
Notifications
You must be signed in to change notification settings - Fork 367
47 lines (40 loc) · 1.45 KB
/
ci.yaml
File metadata and controls
47 lines (40 loc) · 1.45 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
name: CI
on: [push, pull_request]
# Default to 'contents: read', which grants actions to read commits. Any
# permission not included is implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ${{ matrix.platform }}
timeout-minutes: 20 # guardrails timeout
strategy:
fail-fast: false
matrix:
# Oldest supported + currently supported Go versions
go: ["1.12.x", "oldstable", "stable"]
platform: [ubuntu-latest, windows-latest, macos-latest]
exclude:
# go1.12 is not available for windows and macos on GitHub actions.
- go: "1.12.x"
platform: windows-latest
- go: "1.12.x"
platform: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: ${{ matrix.go }}
- name: Test
# Cannot enable shuffle for now because some tests rely on global state and order
# run: go test -race -v -shuffle=on ./...
run: go test -race -v ./...
- name: Lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.7