-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.24 KB
/
test.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
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest , macos-latest, windows-latest ]
go-version: [ '1.18', '1.19' ]
steps:
- name: Configure Windows
if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf false # fixes go lint fmt error
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Lint
uses: golangci/golangci-lint-action@v3
- name: Test Windows 1.18 # can't run race detector on windows with go 1.18 or lower due to a bug (https://github.com/golang/go/issues/46099)
if: matrix.os == 'windows-latest' && matrix.go-version == '1.18'
uses: n8maninger/action-golang-test@v1
with:
args: "-tags='testing';-timeout=300s"
- name: Test
if: matrix.os != 'windows-latest' || matrix.go-version != '1.18'
uses: n8maninger/action-golang-test@v1
with:
args: "-race;-tags='testing';-timeout=300s"
- name: Build
run: go build -o bin/ ./cmd/faucetd