mirror of https://github.com/LemmyNet/lemmy.git
use when path include
parent
5ee42d8b50
commit
d794329282
|
@ -3,6 +3,7 @@
|
|||
|
||||
variables:
|
||||
- &muslrust_image "clux/muslrust:1.70.0"
|
||||
- &slow_check_paths ["crates", "src", "Cargo.toml", "migrations", "api_tests"]
|
||||
|
||||
# Broken for cron jobs currently, see
|
||||
# https://github.com/woodpecker-ci/woodpecker/issues/1716
|
||||
|
@ -49,7 +50,8 @@ pipeline:
|
|||
secrets:
|
||||
[MINIO_ENDPOINT, MINIO_WRITE_USER, MINIO_WRITE_PASSWORD, MINIO_BUCKET]
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations", "api_tests"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
toml_fmt:
|
||||
image: tamasfe/taplo:0.8.1
|
||||
|
@ -76,7 +78,8 @@ pipeline:
|
|||
commands:
|
||||
- cargo check --package lemmy_api_common
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
lemmy_api_common_doesnt_depend_on_diesel:
|
||||
image: *muslrust_image
|
||||
|
@ -85,7 +88,8 @@ pipeline:
|
|||
commands:
|
||||
- "! cargo tree -p lemmy_api_common --no-default-features -i diesel"
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
lemmy_api_common_works_with_wasm:
|
||||
image: *muslrust_image
|
||||
|
@ -95,7 +99,8 @@ pipeline:
|
|||
- "rustup target add wasm32-unknown-unknown"
|
||||
- "cargo check --target wasm32-unknown-unknown -p lemmy_api_common"
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
check_defaults_hjson_updated:
|
||||
image: *muslrust_image
|
||||
|
@ -106,7 +111,8 @@ pipeline:
|
|||
- ./scripts/update_config_defaults.sh config/defaults_current.hjson
|
||||
- diff config/defaults.hjson config/defaults_current.hjson
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
check_diesel_schema:
|
||||
image: willsquire/diesel-cli
|
||||
|
@ -118,7 +124,8 @@ pipeline:
|
|||
- diesel print-schema --config-file=diesel.toml > tmp.schema
|
||||
- diff tmp.schema crates/db_schema/src/schema.rs
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
check_diesel_migration_revertable:
|
||||
image: willsquire/diesel-cli
|
||||
|
@ -129,7 +136,8 @@ pipeline:
|
|||
- diesel migration run
|
||||
- diesel migration redo
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
cargo_clippy:
|
||||
image: *muslrust_image
|
||||
|
@ -154,7 +162,8 @@ pipeline:
|
|||
-D clippy::unwrap_used
|
||||
-D clippy::indexing_slicing
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
cargo_test:
|
||||
image: *muslrust_image
|
||||
|
@ -166,7 +175,8 @@ pipeline:
|
|||
- export LEMMY_CONFIG_LOCATION=../../config/config.hjson
|
||||
- cargo test --workspace --no-fail-fast
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
cargo_build:
|
||||
image: *muslrust_image
|
||||
|
@ -176,7 +186,8 @@ pipeline:
|
|||
- cargo build
|
||||
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations", "api_tests"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
run_federation_tests:
|
||||
image: node:alpine
|
||||
|
@ -190,7 +201,8 @@ pipeline:
|
|||
- yarn
|
||||
- yarn api-test
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations", "api_tests"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
rebuild-cache:
|
||||
image: meltwater/drone-cache:v1
|
||||
|
@ -215,7 +227,8 @@ pipeline:
|
|||
secrets:
|
||||
[MINIO_ENDPOINT, MINIO_WRITE_USER, MINIO_WRITE_PASSWORD, MINIO_BUCKET]
|
||||
when:
|
||||
path: ["crates", "src", "Cargo.toml", "migrations", "api_tests"]
|
||||
path:
|
||||
include: *slow_check_paths
|
||||
|
||||
publish_release_docker:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
|
|
Loading…
Reference in New Issue