Skip to content

Commit

Permalink
Merge pull request #232 from trezor/travis-to-gitlab-partial
Browse files Browse the repository at this point in the history
migrated tests from travis
  • Loading branch information
tsusanka authored Apr 29, 2021
2 parents dc487a0 + 941523b commit b638f9c
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .gitlab-ci.yml
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.

0 comments on commit b638f9c

Please sign in to comment.