Skip to content

Commit

Permalink
Add a Github action to run GoLang unittests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed Apr 4, 2024
1 parent 0a44acc commit 31ca3b7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# A basic workflow for Go
name: test-go
on: [push]
defaults:
run:
shell: bash -ieo pipefail {0}
jobs:
test:
name: golang test & build
# Must run on github hosted runners
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.19.2' # The Go version to download (if necessary) and use.
- run: go test ./...
working-directory: app
- run: go build ./..
working-directory: app
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
# https://github.com/golangci/golangci-lint/releases
version: v1.50
# These options work around the errors in this issue
# https://github.com/golangci/golangci-lint-action/issues/244
skip-pkg-cache: true
skip-build-cache: true
working-directory: app

0 comments on commit 31ca3b7

Please sign in to comment.