-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.13 KB
/
Copy pathgo-tests.yaml
File metadata and controls
45 lines (35 loc) · 1.13 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
name: Go CLI Test
on:
push:
branches: [ "main" ]
workflow_call: # allows other workflows to call this
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Ubuntu 22.04 LTS uses go 1.18
# Debian 12 (bookworm) uses go 1.19
# Ubuntu 24.04 LTS uses go 1.22
# Debian 13 (trixie) uses 1.24
# Ubuntu 26.04 LTS and build uses 1.26
go-version: [1.18, 1.19, 1.22, 1.24, 1.26]
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: ${{ matrix.go-version }}
cache: false # cache not needed if there is no go.sum file
# not needed without dependencies
# - name: Install dependencies
# run: go mod tidy
- name: Vet
run: go vet ./...
- name: Run tests
run: go test -race ./... -v