ci: Make docs-only PRs only trigger docs-related tests (#18744)
This should speed up any docs-only PRs so that they don't have to run the full 5 minute battery of tests. Release Notes: - N/A
This commit is contained in:
parent
1b06c70a76
commit
bd746145b0
3 changed files with 13 additions and 3 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -7,9 +7,13 @@ on:
|
||||||
- "v[0-9]+.[0-9]+.x"
|
- "v[0-9]+.[0-9]+.x"
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
paths-ignore:
|
||||||
|
- "docs/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
|
paths-ignore:
|
||||||
|
- "docs/**"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Allow only one workflow per any non-`main` branch.
|
# Allow only one workflow per any non-`main` branch.
|
||||||
|
|
7
.github/workflows/docs.yml
vendored
7
.github/workflows/docs.yml
vendored
|
@ -20,11 +20,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
version: 9
|
version: 9
|
||||||
|
|
||||||
- run: |
|
- name: Prettier Check on /docs
|
||||||
|
working-directory: ./docs
|
||||||
|
run: |
|
||||||
pnpm dlx prettier . --check || {
|
pnpm dlx prettier . --check || {
|
||||||
echo "To fix, run from the root of the zed repo:"
|
echo "To fix, run from the root of the zed repo:"
|
||||||
echo " cd docs && pnpm dlx prettier . --write && cd .."
|
echo " cd docs && pnpm dlx prettier . --write && cd .."
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
working-directory: ./docs
|
- name: Check spelling
|
||||||
|
run: script/check-spelling docs/
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
TYPOS_CLI_VERSION=1.24.6
|
TYPOS_CLI_VERSION=1.24.6
|
||||||
|
TARGET_DIR=${1:-""}
|
||||||
|
|
||||||
if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; then
|
if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; then
|
||||||
echo "Installing typos-cli@$TYPOS_CLI_VERSION..."
|
echo "Installing typos-cli@$TYPOS_CLI_VERSION..."
|
||||||
|
@ -8,4 +11,4 @@ if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; th
|
||||||
else
|
else
|
||||||
echo "typos-cli@$TYPOS_CLI_VERSION is already installed."
|
echo "typos-cli@$TYPOS_CLI_VERSION is already installed."
|
||||||
fi
|
fi
|
||||||
typos
|
typos $TARGET_DIR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue