Skip to content
Snippets Groups Projects

ci: create

Merged Éloïs requested to merge elois-ci into master
.gitlab-ci.yml 0 → 100644
+ 67
0
 
stages:
 
- style
 
- tests
 
- quality
 
- build
 
 
workflow:
 
rules:
 
- changes:
 
- node/**/*
 
- pallets/**/*
 
- runtime/**/*
 
- .gitlab-ci.yml
 
- Cargo.toml
 
- Cargo.lock
 
 
.env:
 
image: paritytech/ci-linux:production
 
tags:
 
- redshift
 
 
rustfmt:
 
extends: .env
 
stage: style
 
rules:
 
- if: $CI_COMMIT_TAG
 
when: never
 
- if: $CI_MERGE_REQUEST_ID
 
script:
 
- cargo fmt -- --version
 
- cargo fmt -- --check
 
 
tests:
 
extends: .env
 
rules:
 
- if: $CI_COMMIT_REF_NAME =~ /^wip*$/
 
when: manual
 
- if: $CI_COMMIT_TAG
 
when: never
 
- if: '$CI_MERGE_REQUEST_ID ||$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH =~ /^release/'
 
- when: manual
 
stage: tests
 
script:
 
- cargo test
 
 
clippy:
 
extends: .env
 
rules:
 
- if: $CI_COMMIT_TAG
 
when: never
 
- if: $CI_MERGE_REQUEST_ID
 
- when: on_success
 
stage: quality
 
script:
 
- cargo clippy -- -V
 
- cargo clippy --all --tests -- -D warnings --verbose
 
 
build:
 
extends: .env
 
rules:
 
- if: $CI_COMMIT_REF_NAME =~ /^wip*$/
 
when: manual
 
- if: '$CI_COMMIT_TAG || $CI_MERGE_REQUEST_ID ||$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH =~ /^release/'
 
- when: manual
 
stage: build
 
script:
 
- cargo build --release
 
\ No newline at end of file
Loading