1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-05 06:26:08 +00:00
arikawa/.build.yml

38 lines
1,022 B
YAML
Raw Normal View History

2021-01-28 08:11:58 +00:00
image: "nixos/latest"
packages:
- nixos.go
- nixos.git
- nixos.gcc
sources:
- https://github.com/diamondburned/arikawa
secrets:
# Integration test secrets.
- f51d6157-b4be-4697-99d0-6cd129243f63
environment:
GO111MODULE: "on"
CGO_ENABLED: "1"
# Integration test variables.
tested: "./api,./gateway,./bot,./discord"
cov_file: "/tmp/cov_results"
dismock: "github.com/mavolin/dismock/v2/pkg/dismock"
dismock_v: "259685b84e4b6ab364b0fd858aac2aa2dfa42502"
tasks:
- build: cd arikawa && go build ./...
- unit: cd arikawa && go test -tags unitonly -race ./...
- integration: |-
sh -c '
2021-01-28 21:41:43 +00:00
test -f ~/.env || {
echo "Skipped integration tests."
exit 0
}
2021-01-28 08:11:58 +00:00
cd arikawa
go get ./...
go get $dismock@$dismock_v
source ~/.env
go test -coverpkg $tested -coverprofile $cov_file -race ./... $dismock
go tool cover -func $cov_file
'