-
-
Notifications
You must be signed in to change notification settings - Fork 140
58 lines (55 loc) · 1.38 KB
/
ci.yml
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
50
51
52
53
54
55
56
57
58
on:
push:
branches:
- master
pull_request:
name: CI
jobs:
test:
name: Test / Go ${{ matrix.go }}
runs-on: ubuntu-latest
strategy:
matrix:
# These are the release channels.
# Hermit will handle installing the right patch.
go: ["1.20", "1.21"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init Hermit
run: ./bin/hermit env -r >> "$GITHUB_ENV"
- name: Install Go ${{ matrix.go }}
run: |
hermit install go@"${GO_VERSION}"
go version
env:
GO_VERSION: ${{ matrix.go }}
- name: Test
run: go test ./...
test-windows:
name: Test / Windows / Go ${{ matrix.go }}
runs-on: windows-latest
strategy:
matrix:
# These are versions for GitHub's setup-go.
# '.x' will pick the latest patch release.
go: ["1.20.x", "1.21.x"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init Hermit
run: ./bin/hermit env -r >> "$GITHUB_ENV"
- name: golangci-lint
run: golangci-lint run