Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint

on:
- push
- pull_request

env:
CGO_LDFLAGS_ALLOW: "-s|-w"

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18.x"]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Cache mods
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Download mods
run: go mod download
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
args: --timeout 2m0s
skip-cache: true
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test

on:
- push
- pull_request

env:
CGO_LDFLAGS_ALLOW: "-s|-w"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18.x", "1.17.x", "1.16.x"]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Cache mods
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Download mods
run: go mod download
- name: Test
run: go test ./...