mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 16:03:44 +01:00
Tweak build action
This commit is contained in:
parent
c2d899f2a3
commit
f10e2ac639
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -18,16 +18,16 @@ jobs:
|
|||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.15
|
||||||
- run: sudo --preserve-env go version && sudo --preserve-env which go
|
- run: sudo $(which go) version
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build binary to make sure it works
|
- name: Build binary to make sure it works
|
||||||
run: go build -mod vendor
|
run: go build -mod vendor
|
||||||
- name: Test
|
- name: Test
|
||||||
# We're using "sudo" because one of the tests leverages ping, which requires super-user privileges.
|
# We're using "sudo" because one of the tests leverages ping, which requires super-user privileges.
|
||||||
# As for the "PATH=$PATH", we need it to use the same "go" executable that was configured by the "Set
|
# As for the "$(which go)", we need it to use the same "go" executable that was configured by the "Set
|
||||||
# up Go" step.
|
# up Go" step (otherwise, it'd use sudo's "go" executable)
|
||||||
run: sudo "PATH=$PATH" go test -mod vendor ./... -race -coverprofile=coverage.txt -covermode=atomic
|
run: sudo $(which go) test -mod vendor ./... -race -coverprofile=coverage.txt -covermode=atomic
|
||||||
- name: Codecov
|
- name: Codecov
|
||||||
uses: codecov/codecov-action@v1.0.14
|
uses: codecov/codecov-action@v1.0.14
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user