passforios-gopenpgp/.gitlab-ci.yml
2019-05-14 18:09:06 +02:00

33 lines
1.1 KiB
YAML

variables:
REPO_NAME: github.com/ProtonMail/gopenpgp
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- export PATH=/opt/local/bin:$PATH
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- cd $GOPATH/src/$REPO_NAME
- glide install
stages:
- test
test-all:
stage: test
image: gitlab.protontech.ch:4567/protonmail/import-export/linux
script:
- go test -coverprofile cover.out ./...
- mkdir reports
- go tool cover -html=cover.out -o reports/cover.html
- go run vendor/github.com/golangci/golangci-lint/cmd/golangci-lint/main.go run crypto/... --enable-all -D govet -D interfacer -D gofmt -D prealloc -D gochecknoglobals -D goimports -D gosec -D gocritic -D gochecknoinits
tags:
- coverage
artifacts:
paths:
- reports
reports:
junit: reports/cover.html
when: always
expire_in: 5 days