mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 00:17:56 +00:00
dc6fe9a395
* CI: Fix check-try-runtime (preparation for the monorepo) Warnings should be treated as errors here, since this is how it will be done in the monorepo. I expect to see two errors in this check now. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Allow deprecated Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove try-runtime command Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * make it compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove try-runtime-cli dependency Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
112 lines
3.2 KiB
YAML
112 lines
3.2 KiB
YAML
# This file is part of .gitlab-ci.yml
|
|
# Here are all jobs that are executed during "test" stage
|
|
|
|
# It's more like a check, but we want to run this job with real tests in parallel
|
|
find-fail-ci-phrase:
|
|
stage: test
|
|
variables:
|
|
CI_IMAGE: "paritytech/tools:latest"
|
|
ASSERT_REGEX: "FAIL-CI"
|
|
GIT_DEPTH: 1
|
|
extends:
|
|
- .kubernetes-env
|
|
script:
|
|
- set +e
|
|
- rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$?
|
|
- if [ $exit_status -eq 0 ]; then
|
|
echo "$ASSERT_REGEX was found, exiting with 1";
|
|
exit 1;
|
|
else
|
|
echo "No $ASSERT_REGEX was found, exiting with 0";
|
|
exit 0;
|
|
fi
|
|
|
|
test-linux-stable:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .pipeline-stopper-artifacts
|
|
before_script:
|
|
- !reference [.docker-env, before_script]
|
|
- !reference [.pipeline-stopper-vars, before_script]
|
|
variables:
|
|
# Enable debug assertions since we are running optimized builds for testing
|
|
# but still want to have debug assertions.
|
|
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
|
script:
|
|
- time cargo nextest run --all --release --locked --run-ignored all
|
|
|
|
test-doc:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
variables:
|
|
# Enable debug assertions since we are running optimized builds for testing
|
|
# but still want to have debug assertions.
|
|
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
|
script:
|
|
- time cargo test --doc
|
|
|
|
check-runtime-benchmarks:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
script:
|
|
# Check that the node will compile with `runtime-benchmarks` feature flag.
|
|
- time cargo check --locked --all --features runtime-benchmarks
|
|
# Check that parachain-template will compile with `runtime-benchmarks` feature flag.
|
|
- time cargo check --locked -p parachain-template-node --features runtime-benchmarks
|
|
|
|
cargo-check-try-runtime:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
variables:
|
|
RUSTFLAGS: "-D warnings"
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
needs:
|
|
- job: check-runtime-benchmarks
|
|
artifacts: false
|
|
script:
|
|
# Check that the node will compile with `try-runtime` feature flag.
|
|
- time cargo check --locked --all --features try-runtime
|
|
# Check that parachain-template will compile with `try-runtime` feature flag.
|
|
- time cargo check --locked -p parachain-template-node --features try-runtime
|
|
|
|
check-rustdoc:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
variables:
|
|
SKIP_WASM_BUILD: 1
|
|
RUSTDOCFLAGS: "-Dwarnings"
|
|
script:
|
|
- time cargo doc --workspace --all-features --verbose --no-deps
|
|
|
|
cargo-check-benches:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
needs:
|
|
- job: check-rustdoc
|
|
artifacts: false
|
|
script:
|
|
- time cargo check --all --benches
|
|
|
|
cargo-clippy:
|
|
stage: test
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
script:
|
|
- echo $RUSTFLAGS
|
|
- cargo version && cargo clippy --version
|
|
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --locked --all-targets --workspace
|