1
1
mirror of https://github.com/walles/moar.git synced 2024-08-17 07:50:35 +03:00

Follow docs on how to build Go on CI

https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
This commit is contained in:
Johan Walles 2023-03-03 08:20:41 +01:00
parent 367c44d734
commit 97851b2516
2 changed files with 12 additions and 9 deletions

View File

@ -9,6 +9,14 @@ jobs:
validate:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
# golangci-lint is required by test.sh. Latest version here if you want
# to bump it, version number is at the end of the "curl | sh"
# commandline below:
@ -16,13 +24,4 @@ jobs:
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)"/bin v1.50.1
# Source: https://www.scivision.dev/github-actions-path-append/
#
# Required for the golangci-lint that we just installed to work.
- name: Add GOPATH/bin to PATH
run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: Check out repository code
uses: actions/checkout@v2
- run: ./test.sh

View File

@ -11,5 +11,9 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: go build
- run: go test -timeout 30s ./...