update ci

add test in ci

add editorconfig
This commit is contained in:
xfy
2024-05-14 09:37:32 +08:00
parent cdf4e4713a
commit c8fb6c0e2d
2 changed files with 15 additions and 2 deletions

8
.editorconfig Normal file
View File

@ -0,0 +1,8 @@
root = true
[*]
indent_style = space
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4

View File

@ -1,9 +1,10 @@
stages:
- test
- build
variables:
APP_NAME: "candy"
GIT_CLONE_PATH: '$CI_BUILDS_DIR/$CI_PROJECT_NAME/$CI_PIPELINE_ID'
GIT_CLONE_PATH: "$CI_BUILDS_DIR/$CI_PROJECT_NAME/$CI_PIPELINE_ID"
image: "rust:latest"
@ -17,6 +18,11 @@ before_script:
- echo "registry = \"sparse+https://mirrors.ustc.edu.cn/crates.io-index/\"" >> $HOME/.cargo/config
- mkdir public
test:
stage: test
script:
- cargo test
build:linux-gnu-amd64:
stage: build
rules:
@ -68,4 +74,3 @@ rustdoc:
artifacts:
paths:
- target/doc