Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify testing all examples #75

Merged
merged 4 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading