From 164c314271048f707c204aced0ddd680972f5b72 Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Mon, 9 Nov 2026 22:32:05 +0100 Subject: [PATCH 1/3] Validate swup.js.org in CI (crawl, parallel) --- .github/workflows/validate.yml | 32 ++++++++++++++++++++++++++++++++ swup.config.js | 1 + 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..1361828 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,32 @@ +name: Validate swup.js.org + +# End-to-end check: `swup validate` against the docs site +# Config in swup.config.js + +on: + push: + branches: [main, master, next] + pull_request: + workflow_dispatch: + +jobs: + validate: + name: Validate swup.js.org + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Check out repo + uses: actions/checkout@v6 + + - name: Set up node + uses: actions/setup-node@v6 + with: + node-version: 24 + + - run: npm ci + - run: npm run build + - run: npx playwright install --with-deps chromium + + - name: Validate swup.js.org + run: ./bin/run.js validate --parallel diff --git a/swup.config.js b/swup.config.js index f6683d2..30c1441 100644 --- a/swup.config.js +++ b/swup.config.js @@ -4,6 +4,7 @@ export default { }, validate: { url: 'https://swup.js.org', + crawl: true, limit: 10 } }; From c488c04daf7bb424a923d1cf5487ecc98a6c3759 Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Mon, 9 Nov 2026 22:34:48 +0100 Subject: [PATCH 2/3] Run validate workflow on ubuntu-24.04 (Playwright 1.55 lacks 26.04 support) --- .github/workflows/validate.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1361828..e793b6c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -12,7 +12,8 @@ on: jobs: validate: name: Validate swup.js.org - runs-on: ubuntu-latest + # Playwright 1.55 doesn't support ubuntu 26.04 (ubuntu-latest) yet + runs-on: ubuntu-24.04 timeout-minutes: 10 steps: From cf451b02fbc567b6f3b7bd2dda27defe1fc6c211 Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Mon, 9 Nov 2026 22:41:13 +0100 Subject: [PATCH 3/3] Validate swup.js.org via its deployed sitemap, same as swup/docs --- .github/workflows/validate.yml | 7 ++++--- swup.config.js | 9 +++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e793b6c..cbddcfc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,7 +1,7 @@ name: Validate swup.js.org -# End-to-end check: `swup validate` against the docs site -# Config in swup.config.js +# End-to-end check: `swup validate` against the docs site, +# same as `npm run test:validate` in swup/docs on: push: @@ -30,4 +30,5 @@ jobs: - run: npx playwright install --with-deps chromium - name: Validate swup.js.org - run: ./bin/run.js validate --parallel + run: >- + ./bin/run.js validate --parallel --sitemap=https://swup.js.org/sitemap.xml diff --git a/swup.config.js b/swup.config.js index 30c1441..7e3f74d 100644 --- a/swup.config.js +++ b/swup.config.js @@ -1,10 +1,7 @@ +// Mirrors swup.config.mjs in swup/docs export default { swup: { - animationSelector: '[class*="swup-transition-"]' - }, - validate: { - url: 'https://swup.js.org', - crawl: true, - limit: 10 + animationSelector: '[class*="swup-transition-"]', + containers: ['#swup'] } };