Skip to content

Commit

Permalink
ci: use the test feature in CI jobs
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Mar 21, 2022
1 parent c6dc102 commit 8b83742
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ commands:
parameters:
workspace_member:
type: string
features:
type: string
steps:
- run:
no_output_timeout: 30m
command: |
cd << parameters.workspace_member >>
cargo test -- --list --format terse | sed 's/: test//' > test_names.txt
cargo test --features=<< parameters.features >> -- --list --format terse | sed 's/: test//' > test_names.txt
TEST_NAMES=$(circleci tests split test_names.txt)
for i in $(echo $TEST_NAMES | sed "s/ / /g")
do
Expand All @@ -77,6 +79,7 @@ jobs:
cache_key: snarkos-integration-cache
- run_parallel:
workspace_member: .integration
features: test
- clear_environment:
cache_key: snarkos-integration-cache

Expand All @@ -91,6 +94,7 @@ jobs:
cache_key: snarkos-environment-cache
- run_parallel:
workspace_member: environment
features: network
- clear_environment:
cache_key: snarkos-environment-cache

Expand All @@ -105,6 +109,7 @@ jobs:
cache_key: snarkos-metrics-cache
- run_parallel:
workspace_member: metrics
features: test
- clear_environment:
cache_key: snarkos-metrics-cache

Expand All @@ -119,6 +124,7 @@ jobs:
cache_key: snarkos-network-cache
- run_parallel:
workspace_member: network
features: test
- clear_environment:
cache_key: snarkos-network-cache

Expand All @@ -133,6 +139,7 @@ jobs:
cache_key: snarkos-rpc-cache
- run_parallel:
workspace_member: rpc
features: ""
- clear_environment:
cache_key: snarkos-rpc-cache

Expand All @@ -147,6 +154,7 @@ jobs:
cache_key: snarkos-stable-cache
- run_parallel:
workspace_member: .
features: test
- clear_environment:
cache_key: snarkos-stable-cache

Expand All @@ -161,6 +169,7 @@ jobs:
cache_key: snarkos-storage-cache
- run_parallel:
workspace_member: storage
features: test
- clear_environment:
cache_key: snarkos-storage-cache

Expand Down

0 comments on commit 8b83742

Please sign in to comment.