2021-02-20 12:26:51 +01:00
|
|
|
variables:
|
|
|
|
RUST_IMAGE: "rust:latest"
|
|
|
|
NODE_IMAGE: "node:lts"
|
2021-03-15 22:43:14 +01:00
|
|
|
CARGO_HOME: $CI_PROJECT_DIR/cargo
|
2020-09-28 18:43:55 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
stages:
|
|
|
|
- lint
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- release
|
2020-09-28 18:43:55 +02:00
|
|
|
|
2021-03-15 22:43:14 +01:00
|
|
|
cache:
|
|
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
|
|
paths:
|
|
|
|
- target
|
|
|
|
- cargo
|
|
|
|
- ui/node_modules
|
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
lint:backend:
|
|
|
|
stage: lint
|
|
|
|
image: $RUST_IMAGE
|
|
|
|
script:
|
|
|
|
- rustup component add clippy
|
|
|
|
- make backend_lint
|
|
|
|
rules:
|
|
|
|
- allow_failure: true
|
|
|
|
|
|
|
|
#lint:frontend:
|
|
|
|
# stage: lint
|
|
|
|
# image: $NODE_IMAGE
|
|
|
|
# script:
|
|
|
|
# - make frontend_lint
|
|
|
|
# rules:
|
|
|
|
# - allow_failure: true
|
|
|
|
|
|
|
|
build:backend:
|
|
|
|
stage: build
|
|
|
|
image: $RUST_IMAGE
|
|
|
|
script:
|
|
|
|
- rustc --version && cargo --version
|
|
|
|
- make backend
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target
|
|
|
|
expire_in: 1 day
|
|
|
|
|
|
|
|
build:frontend:
|
|
|
|
stage: build
|
|
|
|
image: $NODE_IMAGE
|
|
|
|
script:
|
|
|
|
- node --version && npm --version
|
2021-04-05 22:05:52 +02:00
|
|
|
- cd ui && npm i && cd ..
|
2021-02-20 12:26:51 +01:00
|
|
|
- make frontend
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- ui/dist
|
|
|
|
expire_in: 1 day
|
|
|
|
|
|
|
|
test:backend:
|
|
|
|
stage: test
|
|
|
|
image: $RUST_IMAGE
|
|
|
|
script:
|
|
|
|
- make backend_test
|
2020-09-28 18:43:55 +02:00
|
|
|
|
2021-02-20 12:26:51 +01:00
|
|
|
package:
|
|
|
|
stage: release
|
|
|
|
image: $RUST_IMAGE
|
2020-09-28 18:43:55 +02:00
|
|
|
script:
|
2021-02-20 12:26:51 +01:00
|
|
|
- make
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-05 22:05:52 +02:00
|
|
|
- dist
|