update linter and fix lints (#284)

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
Hamza El-Saawy
2023-04-14 15:24:28 -04:00
committed by GitHub
parent b884eb77db
commit 070c828abb
9 changed files with 58 additions and 29 deletions
+33 -11
View File
@@ -4,21 +4,26 @@ on:
- pull_request
env:
GO_VERSION: "1.17"
GO_VERSION: "oldstable"
GOTESTSUM_VERSION: "latest"
jobs:
lint:
name: Lint
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Checkout
uses: actions/checkout@v3
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50
version: v1.52
args: >-
--verbose
--timeout=5m
@@ -31,10 +36,14 @@ jobs:
name: Go Generate
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Checkout
uses: actions/checkout@v3
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run go generate
shell: pwsh
run: |
@@ -45,6 +54,7 @@ jobs:
Write-Output "::error title=Go Generate::Error running go generate."
exit $LASTEXITCODE
}
- name: Diff
shell: pwsh
run: |
@@ -66,11 +76,19 @@ jobs:
matrix:
os: [windows-2019, windows-2022, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Checkout
uses: actions/checkout@v3
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: go test -gcflags=all=-d=checkptr -v ./...
- name: Install gotestsum
run: go install gotest.tools/gotestsum@${{ env.GOTESTSUM_VERSION }}
- name: Test repo
run: gotestsum --format standard-verbose --debug -- -gcflags=all=-d=checkptr -v ./...
build:
name: Build Repo
@@ -78,10 +96,14 @@ jobs:
- test
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Checkout
uses: actions/checkout@v3
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: go build ./pkg/etw/sample/
- run: go build ./tools/etw-provider-gen/
- run: go build ./tools/mkwinsyscall/