-
Notifications
You must be signed in to change notification settings - Fork 67
42 lines (41 loc) · 1.26 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
on: [push, pull_request]
name: Test
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: WillAbides/setup-go-faster@main
with:
go-version: 1.18.x
- uses: actions/checkout@v4
with:
path: './src/github.com/kevinburke/ssh_config'
# staticcheck needs this for GOPATH
- run: |
echo "GO111MODULE=off" >> $GITHUB_ENV
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
- name: Run tests
run: make lint
working-directory: './src/github.com/kevinburke/ssh_config'
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: WillAbides/setup-go-faster@main
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@vp
with:
path: './src/github.com/kevinburke/ssh_config'
- run: |
echo "GO111MODULE=off" >> $GITHUB_ENV
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
- name: Run tests with race detector on
run: make race-test
working-directory: './src/github.com/kevinburke/ssh_config'