Delay database setup
It is only performed during rust unit tests where it's needed.
@@ -40,11 +40,12 @@ jobs:
yarn lint:sol
zk dummy-prover ensure-disabled
cargo fmt --all -- --check
- # Enable offline mode for sqlx to avoid unnecessary database setup. This environment variable is essential.
- SQLX_OFFLINE=true zk f cargo clippy --tests --benches -- -D warnings
+ zk f cargo clippy --tests --benches -- -D warnings
pushd sdk/zksync-crypto
cargo fmt -- --check
- SQLX_OFFLINE=true cargo clippy --all --tests --benches -- -D warnings
+ cargo clippy --all --tests --benches -- -D warnings
+ env:
+ SQLX_OFFLINE: "true"
- name: generic-init
run: |
@@ -59,6 +60,8 @@ jobs:
- name: integration-testkit
run: zk test integration testkit
+ env:
+ SQLX_OFFLINE: "true"
- name: contracts-unit-tests
run: zk test contracts
@@ -67,7 +70,10 @@ jobs:
run: zk test js
- name: rust-unit-tests
- run: zk test rust
+ run: |
+ # Api tests require database setup
+ zk db setup
+ zk test rust
- name: zksync-crypto-tests
run: pushd sdk/zksync-crypto && zk f cargo test --release
