Skip to content

Commit

Permalink
Simplify testing all examples (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmikolajczyk41 authored Oct 27, 2023
1 parent cb0beb1 commit fbdcd97
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 64 deletions.
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ members = [
]

exclude = [
"examples/counter",
"examples/flipper",
"examples/cross-contract-call-tracing",
"examples/mocking",
"examples/",
]

[workspace.package]
Expand All @@ -21,7 +18,7 @@ homepage = "https://github.com/Cardinal-Cryptography/drink"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/Cardinal-Cryptography/drink"
version = "0.5.3"
version = "0.5.4"

[workspace.dependencies]
anyhow = { version = "1.0.71" }
Expand Down Expand Up @@ -59,5 +56,5 @@ sp-runtime-interface = { version = "19.0.0" }

# Local dependencies

drink = { version = "0.5.3", path = "drink" }
drink-test-macro = { version = "0.5.3", path = "drink/test-macro" }
drink = { version = "0.5.4", path = "drink" }
drink-test-macro = { version = "0.5.4", path = "drink/test-macro" }
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

EXAMPLES = ./examples
EXAMPLES_PATHS := $(shell find $(EXAMPLES) -mindepth 1 -maxdepth 1 -type d)
EXAMPLES_TARGET = ./examples/target

run: ## Run the project
cargo run --release
Expand All @@ -14,9 +15,10 @@ lint: ## Run the linter
cargo clippy --release -- -D warnings

test_examples: ## Run tests for the examples
@mkdir -p $(EXAMPLES_TARGET)
@for dir in $(EXAMPLES_PATHS); do \
echo "Processing $$dir" ; \
cargo test --quiet --manifest-path $$dir/Cargo.toml --release; \
cargo test --quiet --manifest-path $$dir/Cargo.toml --release --target-dir $(EXAMPLES_TARGET); \
done

clean: ## Clean all the workspace build files
Expand Down
25 changes: 0 additions & 25 deletions examples/counter/Cargo.toml

This file was deleted.

31 changes: 0 additions & 31 deletions examples/counter/lib.rs

This file was deleted.

0 comments on commit fbdcd97

Please sign in to comment.