hook2xmpp/.gitlab-ci.yml

44 lines
1021 B
YAML
Raw Normal View History

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