-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
53 lines (46 loc) · 1.33 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# CONFIGURATION
default:
image: "registry.gitlab.com/tangram-vision/oss/ci-oss/public-ci:latest"
stages:
- test
- doc
##### ########## ########## ########## ########## #####
# TEST STAGE
# - [PASS REQ] runs all unit tests in the build
# - [PASS REQ] runs a lint checker over every piece of code
test:
stage: test
script:
- rustc --version
- cargo --version
- cargo test --verbose
lint:
stage: test
script:
- rustc --version
- cargo --version
- cargo clippy --all-targets --all-features -- -D warnings
##### ########## ########## ########## ########## #####
# DOC STAGE
# - [PASS OPT] checks for documentation on all relevant pieces of code
# - [PASS REQ] creates documentation pages
doc-check:
stage: doc
script:
- cargo clippy --all-targets --all-features -- -A clippy::all -D clippy::missing_docs_in_private_items
allow_failure: true
pages:
stage: doc
# Run this at the same time as test and lint jobs
# https://docs.gitlab.com/ee/ci/yaml/#needs
needs: []
script:
- cargo doc --no-deps --document-private-items
- mkdir public
- cp -r target/doc/* public
- LOWERCASE_PROJECT_NAME=$(echo $CI_PROJECT_NAME | awk '{print tolower($0)}') && echo "<meta http-equiv=refresh content=0;url=$LOWERCASE_PROJECT_NAME>" > public/index.html
artifacts:
paths:
- public
only:
- main