diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 12ca53431994ee2090c9f7d83ee19ac92aa313be..323dd7fd1b52eb43400658470ee7d7c986f219fa 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -47,7 +47,7 @@ jobs: } check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP - check_pattern "run_docs" '^docs/' -qP + check_pattern "run_docs" '^(docs/|crates/.*\.rs)' -qP check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP check_pattern "run_nix" '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' -qP check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))' -qvP diff --git a/tooling/xtask/src/tasks/workflows.rs b/tooling/xtask/src/tasks/workflows.rs index 31ca9590f1d6c8c935da4056930db470913656c9..c18eca52be8cf7fa369f46427c58b1d6b70e8bd0 100644 --- a/tooling/xtask/src/tasks/workflows.rs +++ b/tooling/xtask/src/tasks/workflows.rs @@ -23,6 +23,9 @@ mod vars; pub struct GenerateWorkflowArgs {} pub fn run_workflows(_: GenerateWorkflowArgs) -> Result<()> { + if !Path::new("crates/zed/").is_dir() { + anyhow::bail!("xtask workflows must be ran from the project root"); + } let dir = Path::new(".github/workflows"); let workflows = vec![ diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs index 5894f92df88d8154ddd0eeb49b5cb4825931879a..5fff9bc8ec40941ca8e32faeaca416aeea2c7a4b 100644 --- a/tooling/xtask/src/tasks/workflows/run_tests.rs +++ b/tooling/xtask/src/tasks/workflows/run_tests.rs @@ -25,7 +25,7 @@ pub(crate) fn run_tests() -> Workflow { "run_tests", r"^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))", ); - let should_check_docs = PathCondition::new("run_docs", r"^docs/"); + let should_check_docs = PathCondition::new("run_docs", r"^(docs/|crates/.*\.rs)"); let should_check_scripts = PathCondition::new( "run_action_checks", r"^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/",