1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-10-31 20:14:21 +00:00
arikawa/.build.yml

39 lines
1 KiB
YAML
Raw Permalink 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.
2021-06-10 23:48:32 +00:00
SHARD_COUNT: "3"
2021-01-28 08:11:58 +00:00
tested: "./api,./gateway,./bot,./discord"
cov_file: "/tmp/cov_results"
dismock: "github.com/mavolin/dismock/v2/pkg/dismock"
dismock_v: "259685b84e4b6ab364b0fd858aac2aa2dfa42502"
tasks:
2021-11-10 00:02:27 +00:00
- build: cd arikawa && go build ./...
2021-01-28 08:11:58 +00:00
- 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
'