Skip to content

Commit

Permalink
move test-suite
Browse files Browse the repository at this point in the history
  • Loading branch information
hard-nett committed Dec 26, 2023
1 parent 2eb5830 commit 5aea5be
Show file tree
Hide file tree
Showing 104 changed files with 67 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ members = [
"packages/nft/*",
"packages/revenue/*",
"packages/utils/*",
"e2e"
"e2e",
"test-suite",
]

resolver = "2"
Expand All @@ -30,7 +31,7 @@ terp-residual-registry = { path = "contracts/revenue/residual-registry", feature
terp721 = { version = "0.1.0", path = "packages/nft/terp721", features = ["library"] }
terp721-base = { version = "0.1.0", path = "contracts/nft/collections/terp721-base", features = ["library"] }
terp721-nt = { version = "0.1.0", path = "contracts/nft/collections/terp721-nt" }
terp-splits = { version = "0.1.0", path = "contracts/revenue/splits" }
terp-splits = { version = "0.1.0", path = "contracts/revenue/splits" }
terp721-updatable = { version = "0.1.0", path = "contracts/nft/collections/terp721-updatable" }
base-factory = { version = "0.1.0", path = "contracts/nft/factories/base-factory" }
vending-factory = { version = "0.1.0", path = "contracts/nft/factories/vending-factory", features = ["library"] }
Expand Down Expand Up @@ -73,7 +74,7 @@ anyhow = "1.0.41"

# dev-dependencies
cw-multi-test = "0.16.5"
terp-multi-test = { version = "0.1.0", path = "packages/utils/terp-multi-test" }
terp-multi-test = { version = "0.1.0", path = "packages/utils/terp-multi-test" }
assert_matches = "1.5"
serde_json = "1.0"
env_logger = "0.9.0"
Expand All @@ -82,7 +83,7 @@ once_cell = "1.13.0"
rand = "0.8"
itertools = "0.10.5"
mockall = "0.11.4"
test-suite = { version = "0.1.0", path = "packages/utils/test-suite" }
test-suite = { version = "0.1.0", path = "test-suite" }
cw-ownable = "0.5.1"
url = "2.2.2"

Expand Down
48 changes: 48 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.PHONY: deploy-local e2etest e2etest-full lint optimize publish-packages publish-contracts schema release

TEST_ADDRS ?= $(shell jq -r '.[].address' ./e2e/configs/test_accounts.json | tr '\n' ' ')
GAS_LIMIT ?= "75000000"

deploy-local:
docker kill stargaze || true
docker volume rm -f stargaze_data
docker run --rm -d --name stargaze \
-e DENOM=ustars \
-e CHAINID=testing \
-e GAS_LIMIT=$(GAS_LIMIT) \
-p 1317:1317 \
-p 26656:26656 \
-p 26657:26657 \
-p 9090:9090 \
--mount type=volume,source=stargaze_data,target=/root \
publicawesome/stargaze:8.0.0 /data/entry-point.sh $(TEST_ADDRS)

e2etest:
RUST_LOG=info CONFIG=configs/cosm-orc.yaml cargo integration-test $(TEST_NAME)

e2etest-full: deploy-local optimize e2etest

lint:
cargo clippy --all-targets -- -D warnings

optimize:
# NOTE: On a cache miss, the dockerized workspace-optimizer container
# is creating these dirs with permissions we cannot use in CI.
# So, we need to ensure these dirs are created before calling optimize.sh:
mkdir -p artifacts target
sh scripts/optimize.sh

publish-packages:
sh scripts/publish-packages.sh

publish-contracts:
sh scripts/publish-contracts.sh

schema:
sh scripts/schema.sh $(VERSION)

release:
sh scripts/release.sh $(VERSION)

upload:
sh scripts/upload.sh
20 changes: 10 additions & 10 deletions packages/utils/unit-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ repository = { workspace = true }
license = { workspace = true }

[dependencies]
terp-residual-registry = { workspace = true }
terp-residual-registry = { workspace = true }
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }
cw2 = { workspace = true }
factory-utils = { workspace = true }
factory-utils = { workspace = true }
thiserror = { workspace = true }
anyhow = { workspace = true }
terp721-base = { workspace = true }
terp721 = { workspace = true }
terp-sdk = { workspace = true }
terp721-base = { workspace = true }
terp721 = { workspace = true }
terp-sdk = { workspace = true }

[dev-dependencies]
itertools = { workspace = true }
cw-multi-test = { workspace = true }
itertools = { workspace = true }
cw-multi-test = { workspace = true }
terp-multi-test = { workspace = true }
test-suite = { workspace = true }
vending-minter = { workspace = true }
vending-factory = { workspace = true }
test-suite = { workspace = true }
vending-minter = { workspace = true }
vending-factory = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ vending-minter = { workspace = true, features = ["library"] }
base-factory = { workspace = true }
base-minter = { workspace = true }
terp721-nt = { workspace = true }
terp-code-controllers = { workspace = true }
terp-code-controllers = { workspace = true }
cw-ownable = "0.5.1"

[dev-dependencies]
Expand All @@ -78,6 +78,6 @@ rand_xoshiro = { version = "0.6.0", default-features = false }
schemars = { workspace = true }
sha2 = { workspace = true }
shuffle = { git = "https://github.com/webmaster128/shuffle", branch = "rm-getrandom", version = "0.1.7" }
terp-fee = { workspace = true }
minter-utils = { workspace = true }
terp-fee = { workspace = true }
minter-utils = { workspace = true }
url = { workspace = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5aea5be

Please sign in to comment.