70 lines
2 KiB
TOML
70 lines
2 KiB
TOML
[env]
|
|
RUST_BACKTRACE = '1'
|
|
RUSTFLAGS = '-Dwarnings' # Make sure CI fails on all warnings, including Clippy lints
|
|
CARGO_TERM_COLOR = 'always'
|
|
|
|
[tasks.random-actions]
|
|
description = "Run random actions tests"
|
|
run = 'cargo test --package server --test random_actions test_random_actions -- --exact --nocapture'
|
|
dir = "server"
|
|
|
|
[tasks.profile-random-actions]
|
|
description = "Run AI random actions test with profiling"
|
|
run = ["cargo test --release --features profiling --package server --test random_actions test_random_actions -- --exact --nocapture"]
|
|
env = { ITERATIONS = "100000" }
|
|
dir = "server"
|
|
|
|
[tasks.test]
|
|
description = "Run server tests"
|
|
run = 'cargo test {{arg(name="test", default="")}}'
|
|
dir = "server"
|
|
|
|
[tasks.update-tests]
|
|
description = "Run server tests and update JSON files"
|
|
run = 'cargo test --jobs 2 {{arg(name="test", default="")}}'
|
|
env = { UPDATE_EXPECTED = "true", RUSTFLAGS = '' }
|
|
dir = "server"
|
|
|
|
[tasks.format-and-lint]
|
|
description = "Format and lint all code"
|
|
run = [
|
|
"cargo fmt",
|
|
"cargo clippy --fix --allow-dirty --allow-staged"
|
|
]
|
|
|
|
[tasks.ci]
|
|
description = "Run CI tasks server"
|
|
run = [
|
|
"cargo build",
|
|
"cargo fmt --check",
|
|
"cargo clippy",
|
|
"cargo nextest run"
|
|
]
|
|
|
|
[tasks.profile]
|
|
description = "Run AI client with profiling"
|
|
run = ["cargo run --release --package client --features profiling --bin local_client -- ai"]
|
|
dir = "client"
|
|
|
|
[tasks.build-remote-server]
|
|
description = "Build remote server"
|
|
run = "./scripts/build-remote-server.sh test"
|
|
|
|
[tasks.build-remote-client]
|
|
description = "Build remote client"
|
|
run = "./scripts/build-remote-client.sh"
|
|
|
|
[tasks.test-pubish-server]
|
|
description = "Test publish server (the real one is done in GitHub Actions)"
|
|
run = "./scripts/publish-server.sh test"
|
|
|
|
[tasks.test-pubish-client]
|
|
description = "Test publish client (the real one is done in GitHub Actions)"
|
|
run = "./scripts/publish-client.sh test"
|
|
|
|
[tools]
|
|
"cargo:cargo-nextest" = "latest"
|
|
"cargo:wasm-bindgen-cli" = "latest"
|
|
"cargo:wasm-pack" = "latest"
|
|
rust = { version = "latest", targets = "wasm32-unknown-unknown", components = "clippy,rustfmt" }
|
|
|