Move cargo build first in CI (#5933)

* Trying to fix cargo test ci 1.

* 2

* 3

* 3

* Print output

* Try empty restrict key

* Try empty

* Updating from main.

* Use cargo nextest, change CI order to build, test, clippy.

* Dont run clippy for all targets.

* Forgot run

* Forgot another.

* Remove nextest.

* Fixing perm
This commit is contained in:
Dessalines 2025-08-19 17:01:22 -04:00 committed by GitHub
parent 66a8095d4e
commit 29254b1e45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,14 +113,14 @@ steps:
when:
- event: pull_request
cargo_clippy:
cargo_build:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
RUSTUP_HOME: .rustup_home
commands:
- rustup component add clippy
- cargo clippy --workspace --tests --all-targets -- -D warnings
- cargo build
- mv target/debug/lemmy_server target/lemmy_server
when: *slow_check_paths
# `DROP OWNED` doesn't work for default user
@ -154,6 +154,16 @@ steps:
- cargo test --workspace --no-fail-fast
when: *slow_check_paths
cargo_clippy:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
RUSTUP_HOME: .rustup_home
commands:
- rustup component add clippy
- cargo clippy --workspace --tests -- -D warnings
when: *slow_check_paths
# make sure api builds with default features (used by other crates relying on lemmy api)
check_api_common_default_features:
image: *rust_image
@ -183,16 +193,6 @@ steps:
- "cargo check --target wasm32-unknown-unknown -p lemmy_api_common"
when: *slow_check_paths
cargo_build:
image: *rust_image
environment:
CARGO_HOME: .cargo_home
RUSTUP_HOME: .rustup_home
commands:
- cargo build
- mv target/debug/lemmy_server target/lemmy_server
when: *slow_check_paths
check_diesel_schema:
image: *rust_image
environment: