Skip to content

Commit

Permalink
Update test and lint workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
samcoe committed May 9, 2022
1 parent 494f62a commit ee8192e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/lint.yml
@@ -1,6 +1,29 @@
name: Lint
on: [push, pull_request]
permissions:
contents: read
jobs:
go-mod:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.16]
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v3

- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
lint:
strategy:
matrix:
Expand All @@ -9,10 +32,15 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3.1.0
with:
version: latest
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
@@ -1,5 +1,7 @@
name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
strategy:
Expand All @@ -11,12 +13,12 @@ jobs:

steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run tests
run: go test -v ./...

0 comments on commit ee8192e

Please sign in to comment.