-
Notifications
You must be signed in to change notification settings - Fork 66
46 lines (40 loc) · 1.14 KB
/
test.yaml
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
name: Run Tests
on: [push, pull_request]
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
goVer: ["1.22"]
# Defines the platform for each test run.
runs-on: ${{ matrix.os }}
steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v4
# The steps that will be run through for each version and platform combination.
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goVer }}
cache: true
# Runs go test ./...
- name: Test
run: go test -v -short ./...
lint:
runs-on: ubuntu-latest
steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v4
# Installs go using a single version.
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
- name: Run linters
uses: golangci/golangci-lint-action@v4
with:
version: v1.54