diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 675de288..9ed1b425 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -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. @@ -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: @@ -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" @@ -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 }}) @@ -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 }}) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c5ae83a8..f775142e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -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. # @@ -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: @@ -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" @@ -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 }})