⭐
Log in to mark this repository.
Update .gitlab-ci.yml file
26fb8db · Gabriel Morell · 2025-01-16 04:28
Files changed
added
.gitlab-ci.yml
+40
−0
@@ -0,0 +1,40 @@
| 1 | +# This file is a template, and might need editing before it works on your project. | |
| 2 | +# You can copy and paste this template into a new `.gitlab-ci.yml` file. | |
| 3 | +# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. | |
| 4 | +# | |
| 5 | +# To contribute improvements to CI/CD templates, please follow the Development guide at: | |
| 6 | +# https://docs.gitlab.com/ee/development/cicd/templates.html | |
| 7 | +# This specific template is located at: | |
| 8 | +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Rust.gitlab-ci.yml | |
| 9 | + | |
| 10 | +# Official language image. Look for the different tagged releases at: | |
| 11 | +# https://hub.docker.com/r/library/rust/tags/ | |
| 12 | +image: "rust:latest" | |
| 13 | + | |
| 14 | +# Optional: Install a C compiler, cmake and git into the container. | |
| 15 | +# You will often need this when you (or any of your dependencies) depends on C code. | |
| 16 | +# before_script: | |
| 17 | +# - apt-get update -yqq | |
| 18 | +# - apt-get install -yqq --no-install-recommends build-essential | |
| 19 | + | |
| 20 | +# Use cargo to test the project | |
| 21 | +test:cargo: | |
| 22 | + script: | |
| 23 | + - rustc --version && cargo --version # Print version info for debugging | |
| 24 | + - cargo test --workspace --verbose | |
| 25 | + | |
| 26 | +# Optional: Use a third party library to generate gitlab junit reports | |
| 27 | +test:junit-report: | |
| 28 | + script: | |
| 29 | + Should be specified in Cargo.toml | |
| 30 | + - cargo install junitify | |
| 31 | + - cargo test -- --format=json -Z unstable-options --report-time | junitify --out $CI_PROJECT_DIR/tests/ | |
| 32 | + artifacts: | |
| 33 | + when: always | |
| 34 | + reports: | |
| 35 | + junit: $CI_PROJECT_DIR/tests/*.xml | |
| 36 | + | |
| 37 | +deploy: | |
| 38 | + stage: deploy | |
| 39 | + script: echo "TODO " | |
| 40 | + environment: production |
Parents: d539991