1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-12-02 09:47:52 +00:00

CI: Update dismock

This commit is contained in:
diamondburned 2021-09-23 22:25:08 -07:00
parent e203e31ab3
commit 95231f5772
No known key found for this signature in database
GPG key ID: D78C4471CE776659

View file

@ -4,13 +4,15 @@
"GO111MODULE": "on", "GO111MODULE": "on",
"CGO_ENABLED": "1", # for the race detector "CGO_ENABLED": "1", # for the race detector
"COV": "/tmp/cov_results", "COV": "/tmp/cov_results",
"dismock": "github.com/mavolin/dismock/v2/pkg/dismock", "dismock": "github.com/mavolin/dismock/v3/pkg/dismock",
"dismock_v": "259685b84e4b6ab364b0fd858aac2aa2dfa42502", "dismock_v": "259685b84e4b6ab364b0fd858aac2aa2dfa42502",
# used only in integration_test # used only in integration_test
"tested": "./api,./gateway,./bot,./discord" "tested": "./api,./gateway,./bot,./discord"
}, },
"before_script": [ "before_script": [
"apk add git build-base" "apk add git build-base"
"go get ./...",
"go get $dismock@$dismock_v",
], ],
"stages": [ "stages": [
"build", "build",
@ -31,7 +33,7 @@
"variables": [ "$BOT_TOKEN" ] "variables": [ "$BOT_TOKEN" ]
}, },
"script": [ "script": [
"go test -coverprofile $COV -tags unitonly -v -race ./...", "go test -coverpkg $tested -coverprofile $COV -tags unitonly -v -race ./... $dismock",
"go tool cover -func $COV" "go tool cover -func $COV"
] ]
}, },
@ -44,11 +46,7 @@
"variables": [ "$BOT_TOKEN", "$CHANNEL_ID", "$VOICE_ID" ] "variables": [ "$BOT_TOKEN", "$CHANNEL_ID", "$VOICE_ID" ]
}, },
"script": [ "script": [
"go get ./...",
# Test this package along with dismock.
"go get $dismock@$dismock_v",
"go test -coverpkg $tested -coverprofile $COV -v -race ./... $dismock", "go test -coverpkg $tested -coverprofile $COV -v -race ./... $dismock",
"go mod tidy",
"go tool cover -func $COV" "go tool cover -func $COV"
] ]
} }