This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
thrempp/.gitlab-ci.yml

43 lines
1.0 KiB
YAML
Raw Normal View History

2019-05-31 10:07:40 +02:00
image: golang:latest
stages:
- build
- test
variables:
GIT_SUBMODULE_STRATEGY: recursive
2019-05-31 10:07:40 +02:00
before_script:
2019-06-18 01:16:07 +02:00
- mkdir -p "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/"
- cp -R "$CI_PROJECT_DIR" "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/"
- cd "/go/src/dev.sum7.eu/$CI_PROJECT_PATH"
- go get -d -t ./...
2019-05-31 10:07:40 +02:00
build-my-project:
stage: build
script:
2019-06-20 10:18:15 +02:00
- mkdir "$CI_PROJECT_DIR/bin/"
2019-06-18 01:16:07 +02:00
- go install "dev.sum7.eu/$CI_PROJECT_PATH"
2019-06-20 10:18:15 +02:00
- mv "/go/bin/$CI_PROJECT_NAME" "$CI_PROJECT_DIR/bin/$CI_PROJECT_NAME"
2019-05-31 10:07:40 +02:00
artifacts:
paths:
2019-06-20 10:18:15 +02:00
- "bin/$CI_PROJECT_NAME"
2019-05-31 10:07:40 +02:00
- config_example.toml
test-my-project:
stage: test
script:
2019-06-18 01:16:07 +02:00
- go get github.com/client9/misspell/cmd/misspell
- misspell -error .
2019-05-31 10:07:40 +02:00
- ./.ci/check-gofmt
- ./.ci/check-testfiles
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
- go tool cover -func=.testCoverage.txt
2019-06-18 01:16:07 +02:00
artifacts:
paths:
- .testCoverage.txt
2019-05-31 10:07:40 +02:00
test-race-my-project:
stage: test
script:
- go test -race ./...