Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# No `playwright install` step in either job. These tests launch Electron; no
# browser is ever downloaded.
#
# A pull request that changes only Markdown files skips both jobs. Their checks are
# A pull request that changes only documentation (Markdown, docs/public/ and
# scripts/screenshots/, as unit-tests.yml lists) skips both jobs. Their checks are
# required, so the `*-skipped` jobs report the same names as passed on a cheap Linux
# runner; unit-tests.yml explains why it is done this way and not with `paths-ignore`,
# and how base-change.yml re-runs both workflows when a PR's base moves.
Expand Down Expand Up @@ -51,7 +52,8 @@ jobs:
code: ${{ steps.files.outputs.code }}
steps:
# A push to trunk always runs both jobs. On a pull request, any file that is
# not Markdown (including the old name of a renamed file) counts as code. The
# not Markdown and not under docs/public/ or scripts/screenshots/ (including
# the old name of a renamed file) counts as code. The
# list is read live, so a re-run after the base moves sees the new diff.
- id: files
env:
Expand All @@ -64,7 +66,7 @@ jobs:
fi
files=$(gh api --paginate "repos/$GITHUB_REPOSITORY/pulls/$PR/files" \
--jq '.[] | .filename, (.previous_filename // empty)')
if printf '%s\n' "$files" | grep -v '\.md$' > /dev/null; then
if printf '%s\n' "$files" | grep -v -E '\.md$|^docs/public/|^scripts/screenshots/' > /dev/null; then
echo code=true >> "$GITHUB_OUTPUT"
else
echo code=false >> "$GITHUB_OUTPUT"
Expand All @@ -79,7 +81,7 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- run: echo "Only Markdown changed; the journey suite does not run."
- run: echo "Only documentation changed; the journey suite does not run."

journeys:
name: Journeys (${{ matrix.os }})
Expand Down Expand Up @@ -133,7 +135,7 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- run: echo "Only Markdown changed; the packaged smoke test does not run."
- run: echo "Only documentation changed; the packaged smoke test does not run."

packaged:
name: Packaged smoke (${{ matrix.os }})
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
# Nothing here packages or signs an artifact, so this workflow needs no secrets. Buildkite still
# owns the signed builds (.buildkite/pipeline.yml).
#
# A pull request that changes only Markdown files skips the suite. The checks are required, and a
# workflow skipped by `paths-ignore` never reports them, so the PR could not merge. Instead the
# A pull request that changes only documentation skips the suite: Markdown, the static files under
# docs/public/ (the screenshots) and the scripts in scripts/screenshots/ that take them. No test
# loads those scripts; they import test helpers, not the other way round, and lint still covers
# them. docs/.vitepress/ counts as code. The checks are required, and a workflow skipped by
# `paths-ignore` never reports them, so the PR could not merge. Instead the
# `changes` job decides, and `unit-skipped` reports the same check names as passed on a cheap
# Linux runner. e2e.yml does the same.
#
Expand Down Expand Up @@ -42,7 +45,8 @@ jobs:
code: ${{ steps.files.outputs.code }}
steps:
# A push to trunk always runs the suite. On a pull request, any file that is not Markdown
# (including the old name of a renamed file) counts as code. The list is read live, not
# and not under docs/public/ or scripts/screenshots/ (including the old name of a renamed
# file) counts as code. The list is read live, not
# from the event, so a re-run after the base moves sees the new diff.
- id: files
env:
Expand All @@ -55,7 +59,7 @@ jobs:
fi
files=$(gh api --paginate "repos/$GITHUB_REPOSITORY/pulls/$PR/files" \
--jq '.[] | .filename, (.previous_filename // empty)')
if printf '%s\n' "$files" | grep -v '\.md$' > /dev/null; then
if printf '%s\n' "$files" | grep -v -E '\.md$|^docs/public/|^scripts/screenshots/' > /dev/null; then
echo code=true >> "$GITHUB_OUTPUT"
else
echo code=false >> "$GITHUB_OUTPUT"
Expand All @@ -70,7 +74,7 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- run: echo "Only Markdown changed; the unit suite does not run."
- run: echo "Only documentation changed; the unit suite does not run."

unit:
name: unit (${{ matrix.os }})
Expand Down
Loading