mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-11 04:25:55 +00:00
skip api tests
This commit is contained in:
parent
ee091c75da
commit
76f45085d3
1 changed files with 0 additions and 109 deletions
109
.woodpecker.yml
109
.woodpecker.yml
|
@ -95,89 +95,6 @@ steps:
|
||||||
when:
|
when:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
|
|
||||||
cargo_clippy:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- rustup component add clippy
|
|
||||||
- cargo clippy --workspace --tests --all-targets -- -D warnings
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
# `DROP OWNED` doesn't work for default user
|
|
||||||
create_database_user:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
environment:
|
|
||||||
PGUSER: postgres
|
|
||||||
PGPASSWORD: password
|
|
||||||
PGHOST: database
|
|
||||||
PGDATABASE: lemmy
|
|
||||||
commands:
|
|
||||||
- psql -c "CREATE USER lemmy WITH PASSWORD 'password' SUPERUSER;"
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
cargo_test:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
LEMMY_TEST_FAST_FEDERATION: "1"
|
|
||||||
LEMMY_CONFIG_LOCATION: ../../config/config.hjson
|
|
||||||
commands:
|
|
||||||
# Install pg_dump for the schema setup test (must match server version)
|
|
||||||
- apt update && apt install -y lsb-release
|
|
||||||
- sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
|
||||||
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
||||||
- apt update && apt install -y postgresql-client-16
|
|
||||||
# Run tests
|
|
||||||
- cargo test --workspace --no-fail-fast
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
check_ts_bindings:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- ./scripts/ts_bindings_check.sh
|
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
|
|
||||||
# make sure api builds with default features (used by other crates relying on lemmy api)
|
|
||||||
check_api_common_default_features:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- cargo check --package lemmy_api_common
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
lemmy_api_common_doesnt_depend_on_diesel:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- "! cargo tree -p lemmy_api_common --no-default-features -i diesel"
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
lemmy_api_common_works_with_wasm:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- "rustup target add wasm32-unknown-unknown"
|
|
||||||
- "cargo check --target wasm32-unknown-unknown -p lemmy_api_common"
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
check_defaults_hjson_updated:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- ./scripts/update_config_defaults.sh config/defaults_current.hjson
|
|
||||||
- diff config/defaults.hjson config/defaults_current.hjson
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
cargo_build:
|
cargo_build:
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
environment:
|
environment:
|
||||||
|
@ -187,32 +104,6 @@ steps:
|
||||||
- mv target/debug/lemmy_server target/lemmy_server
|
- mv target/debug/lemmy_server target/lemmy_server
|
||||||
when: *slow_check_paths
|
when: *slow_check_paths
|
||||||
|
|
||||||
check_diesel_schema:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
|
||||||
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
- cp crates/db_schema/src/schema.rs tmp.schema
|
|
||||||
- target/lemmy_server migration --all run
|
|
||||||
- <<: *install_diesel_cli
|
|
||||||
- diesel print-schema
|
|
||||||
- diff tmp.schema crates/db_schema/src/schema.rs
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
check_db_perf_tool:
|
|
||||||
image: *rust_image
|
|
||||||
environment:
|
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
CARGO_HOME: .cargo_home
|
|
||||||
commands:
|
|
||||||
# same as scripts/db_perf.sh but without creating a new database server
|
|
||||||
- cargo run --package lemmy_db_perf -- --posts 10 --read-post-pages 1
|
|
||||||
when: *slow_check_paths
|
|
||||||
|
|
||||||
run_federation_tests:
|
run_federation_tests:
|
||||||
image: node:22-bookworm-slim
|
image: node:22-bookworm-slim
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue