all: fix lint #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |