-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from trezor/travis-to-gitlab-partial
migrated tests from travis
- Loading branch information
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
image: docker:latest | ||
build test: | ||
stage: test | ||
image: golang | ||
script: | ||
- go version | ||
- go build . | ||
- go test -v ./... | ||
|
||
services: | ||
- docker:dind | ||
go lint: | ||
stage: test | ||
image: golang | ||
script: | ||
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.32.0 | ||
- golangci-lint run | ||
|
||
build and push emulator image: | ||
before_script: | ||
- apk add --no-cache py-pip | ||
- pip install docker-compose | ||
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD | ||
when: manual | ||
version check: | ||
stage: test | ||
image: golang | ||
script: | ||
- docker-compose -f ./docker-compose.yml build | ||
- docker-compose -f ./docker-compose.yml push | ||
- diff -u VERSION <(grep "var version = " trezord.go | cut -f 2 -d '"') | ||
|
||
#Gitlab does not support xgo building without hacking the base xgo image, for now builds are done manually until we find a better solution. |