workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_REF_NAME =~ /wip\/.*/
when: always
- if: $CI_COMMIT_REF_NAME =~ /wip\/.*/
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: $CI_COMMIT_BRANCH
image: cyloncore/ci:rust
stages:
- precheck
- build
- test
- postcheck
include:
- project: "cyloncore/cc_ci_templates"
file: "/scripts-ci.yml"
ref: "stable"
precheck:
stage: precheck
extends: .cc_all_checks
variables:
CC_CI_REF_BRANCH: "dev/1"
check-default-features:
stage: precheck
script:
- grep -q 'default = \[\]' Cargo.toml
build:
stage: build
script:
- cargo build --all-features
artifacts:
paths:
- target
expire_in: 24h
test:
stage: test
script:
- cargo nextest run --all-features
- cargo test --all-features --doc
artifacts:
when: always
reports:
junit:
- target/nextest/default/junit.xml
clippy:
stage: postcheck
script:
- yet clippy
needs:
- job: "build"
artifacts: true
doc:
stage: postcheck
script:
- yet doc
needs:
- job: "build"
artifacts: true
semver:
stage: postcheck
script:
- yet semver_checks
needs:
- job: "build"
artifacts: true