Skip to content

Commit

Permalink
[ci] Move additional tests back to test-linux-stable (#1466)
Browse files Browse the repository at this point in the history
* [ci] Move additional tests back to test-linux-stable

* run slow tests with all tests

* check if test upgrade_version_checks_should_work works

* rm comment
  • Loading branch information
alvicsam authored Sep 11, 2023
1 parent 056c422 commit a414ea7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 39 deletions.
6 changes: 5 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ workflow:
- if: $CI_COMMIT_BRANCH

variables:
CI_IMAGE: "paritytech/ci-unified:bullseye-1.70.0-2023-05-23-v20230706"
CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
Expand Down Expand Up @@ -213,6 +213,10 @@ include:
- project: parity/infrastructure/ci_cd/shared
ref: v0.2
file: /common/timestamp.yml
# ci image
- project: parity/infrastructure/ci_cd/shared
ref: main
file: /common/ci-unified.yml
# This job cancels the whole pipeline if any of provided jobs fail.
# In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests
# to fail the pipeline as soon as possible to shorten the feedback loop.
Expand Down
62 changes: 24 additions & 38 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ test-linux-stable:
- echo "Node index - ${CI_NODE_INDEX}. Total amount - ${CI_NODE_TOTAL}"
# add experimental to features after https://github.com/paritytech/substrate/pull/14502 is merged
# "upgrade_version_checks_should_work" is currently failing
# "receive_rate_limit_is_enforced"and "benchmark_block_works" can be found in test-linux-stable-additional-tests
# they fail if run with other tests
# "rx::tests::sent_views_include_finalized_number_update", "follow_chain_works", "create_snapshot_works" and "block_execution_works"
# can be found in test-linux-stable-slow
- |
time cargo nextest run \
-E 'all() & !test(upgrade_version_checks_should_work) & !test(receive_rate_limit_is_enforced) & !test(benchmark_block_works) & !test(rx::tests::sent_views_include_finalized_number_update) & !test(follow_chain_works) & !test(create_snapshot_works) & !test(block_execution_works)' \
--workspace \
--locked \
--release \
Expand Down Expand Up @@ -59,6 +54,22 @@ test-linux-oldkernel-stable:
tags:
- oldkernel-vm

# https://github.com/paritytech/ci_cd/issues/864
test-linux-stable-runtime-benchmarks:
stage: test
extends:
- .docker-env
- .common-refs
- .run-immediately
- .pipeline-stopper-artifacts
variables:
RUST_TOOLCHAIN: stable
# 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 --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet

# can be used to run all tests
# test-linux-stable-all:
# stage: test
Expand All @@ -85,7 +96,7 @@ test-linux-oldkernel-stable:
# --partition count:${CI_NODE_INDEX}/${CI_NODE_TOTAL}
# # todo: add flacky-test collector

# for some reasons these tests fail if run with all tests
# TODO: remove me
test-linux-stable-additional-tests:
stage: test
extends:
Expand All @@ -99,31 +110,11 @@ test-linux-stable-additional-tests:
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- |
time cargo nextest run \
-E 'test(receive_rate_limit_is_enforced) + test(benchmark_block_works)' \
--workspace \
--locked \
--release \
--features runtime-benchmarks,try-runtime
# tests were moved to test-linux-stable
# the jobs should be removed
- exit 0

# https://github.com/paritytech/ci_cd/issues/864
test-linux-stable-runtime-benchmarks:
stage: test
extends:
- .docker-env
- .common-refs
- .run-immediately
- .pipeline-stopper-artifacts
variables:
RUST_TOOLCHAIN: stable
# 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 --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet

# these ones can be really slow so it's better to run them separately
# TODO: remove me
test-linux-stable-slow:
stage: test
# remove after cache is setup
Expand All @@ -139,14 +130,9 @@ test-linux-stable-slow:
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- |
time cargo nextest run \
-E 'test(rx::tests::sent_views_include_finalized_number_update) + test(follow_chain_works) + test(create_snapshot_works) + test(block_execution_works)' \
--workspace \
--locked \
--release \
--features runtime-benchmarks,try-runtime
allow_failure: true
# tests were moved to test-linux-stable
# the jobs should be removed
- exit 0

# takes about 1,5h without cache
# can be used to check that nextest works correctly
Expand Down

0 comments on commit a414ea7

Please sign in to comment.