-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (35 loc) · 1.24 KB
/
test-go.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# A basic workflow for Go
name: test-go
on:
# N.B. If we don't trigger on pull_request then I don't think we trigger the workflow
# on PRs created from forks (e.g. outside contributors). If we trigger on push then we
# will end up running the workflow twice.
- pull_request
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.21.3' # 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.57
# 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