-
Notifications
You must be signed in to change notification settings - Fork 134
50 lines (46 loc) · 1.05 KB
/
ci.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
47
48
49
# Workflow used as Continous Integration every time we have a PR.
name: CI
on:
# Only build when pushed to main
push:
branches:
- main
# Build all pull requests
pull_request:
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Lint with golangci-lint
uses: golangci/golangci-lint-action@v3
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
# We only support the latest version of all platforms.
os:
- ubuntu-latest
- windows-latest
- macOS-latest
go:
- "1.19"
- "1.20"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build ./...
- name: Run Unit Tests
run: go test ./...