From 1af3c4aa75ea5267e84a07d6ba12bd300211acef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Sep 2025 20:29:36 +0000 Subject: [PATCH 1/4] Initial plan From 8d73a6d32c8635d254beeec5c205fa12383f9450 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Sep 2025 20:34:44 +0000 Subject: [PATCH 2/4] Extract test-test workflow and separate test tools validation Co-authored-by: fulldecent <382183+fulldecent@users.noreply.github.com> --- .github/workflows/build-test-deploy.yml | 27 +++++++++++++++++++- .github/workflows/test-test.yml | 34 +++++++++++++++++++++++++ package.json | 3 ++- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-test.yml diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 47a0af7..12e16f4 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -108,6 +108,31 @@ jobs: path: cache/ key: test-cache + # Test the test tools themselves + test-test: + name: Test tools validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Installing Node + modern Yarn on GitHub Actions requires hack + # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - name: Enable Corepack + run: corepack enable + - name: Configure dependency cache + uses: actions/setup-node@v4 + with: + cache: yarn + - name: Install dependencies + run: yarn install --immutable + + - name: Test test tools + run: yarn run test-test + # Deploy the GitHub Pages artifact deploy-github-pages: name: Deploy to GitHub Pages @@ -116,7 +141,7 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest - needs: build + needs: [build, test, test-test] steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/test-test.yml b/.github/workflows/test-test.yml new file mode 100644 index 0000000..5209254 --- /dev/null +++ b/.github/workflows/test-test.yml @@ -0,0 +1,34 @@ +name: Test tools validation + +# This action tests the test tools themselves by running them against fixtures +on: + push: + pull_request: + workflow_dispatch: # Can run this workflow manually from the Actions tab + +permissions: read-all + +jobs: + test-test: + name: Test tools validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Installing Node + modern Yarn on GitHub Actions requires hack + # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - name: Enable Corepack + run: corepack enable + - name: Configure dependency cache + uses: actions/setup-node@v4 + with: + cache: yarn + - name: Install dependencies + run: yarn install --immutable + + - name: Test test tools + run: yarn run test-test \ No newline at end of file diff --git a/package.json b/package.json index b536272..1a76422 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "structured-data-testing-tool": "^4.5.0" }, "scripts": { - "test": "yarn node test/fixtures-html-validate-should-fail.mjs && yarn node test/fixtures-structured-data-should-fail.mjs && yarn node test/build-html-validate.mjs && yarn node test/dirty-file-paths-checker.mjs && yarn node test/build-structured-data-validate.mjs", + "test": "yarn node test/build-html-validate.mjs && yarn node test/dirty-file-paths-checker.mjs && yarn node test/build-structured-data-validate.mjs", + "test-test": "yarn node test/fixtures-html-validate-should-fail.mjs && yarn node test/fixtures-structured-data-should-fail.mjs", "test-structured-data": "yarn node test/build-structured-data-validate.mjs", "lint": "yarn prettier-check && yarn markdownlint-check", "lint-fix": "yarn prettier-fix && yarn markdownlint-fix", From c57bf005f7d10bb22638075f5f4418296e40dc05 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Sep 2025 20:46:54 +0000 Subject: [PATCH 3/4] Run yarn lint-fix to fix formatting issues Co-authored-by: fulldecent <382183+fulldecent@users.noreply.github.com> --- .github/workflows/test-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-test.yml b/.github/workflows/test-test.yml index 5209254..505415d 100644 --- a/.github/workflows/test-test.yml +++ b/.github/workflows/test-test.yml @@ -1,7 +1,7 @@ name: Test tools validation # This action tests the test tools themselves by running them against fixtures -on: +on: push: pull_request: workflow_dispatch: # Can run this workflow manually from the Actions tab @@ -31,4 +31,4 @@ jobs: run: yarn install --immutable - name: Test test tools - run: yarn run test-test \ No newline at end of file + run: yarn run test-test From 5c4ce623e0c2bb4b4ba3d0bdae327e70c78c667a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Sep 2025 21:32:01 +0000 Subject: [PATCH 4/4] Fix workflow prerequisites: test-test is prerequisite for test, only build is prerequisite for deploy Co-authored-by: fulldecent <382183+fulldecent@users.noreply.github.com> --- .github/workflows/build-test-deploy.yml | 54 ++++++++++++------------- .github/workflows/test-test.yml | 34 ---------------- 2 files changed, 27 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/test-test.yml diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 12e16f4..7c5744d 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -64,11 +64,36 @@ jobs: path: build/ # the Jekyll build directory include-hidden-files: true # Workaround https://github.com/actions/upload-artifact/issues/610 + # Test the test tools themselves + test-test: + name: Test tools validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Installing Node + modern Yarn on GitHub Actions requires hack + # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - name: Enable Corepack + run: corepack enable + - name: Configure dependency cache + uses: actions/setup-node@v4 + with: + cache: yarn + - name: Install dependencies + run: yarn install --immutable + + - name: Test test tools + run: yarn run test-test + # Test the build artifact test: name: Test runs-on: ubuntu-latest - needs: build + needs: [build, test-test] steps: - uses: actions/checkout@v4 @@ -108,31 +133,6 @@ jobs: path: cache/ key: test-cache - # Test the test tools themselves - test-test: - name: Test tools validation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # Installing Node + modern Yarn on GitHub Actions requires hack - # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Enable Corepack - run: corepack enable - - name: Configure dependency cache - uses: actions/setup-node@v4 - with: - cache: yarn - - name: Install dependencies - run: yarn install --immutable - - - name: Test test tools - run: yarn run test-test - # Deploy the GitHub Pages artifact deploy-github-pages: name: Deploy to GitHub Pages @@ -141,7 +141,7 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest - needs: [build, test, test-test] + needs: build steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/test-test.yml b/.github/workflows/test-test.yml deleted file mode 100644 index 505415d..0000000 --- a/.github/workflows/test-test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Test tools validation - -# This action tests the test tools themselves by running them against fixtures -on: - push: - pull_request: - workflow_dispatch: # Can run this workflow manually from the Actions tab - -permissions: read-all - -jobs: - test-test: - name: Test tools validation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # Installing Node + modern Yarn on GitHub Actions requires hack - # https://github.com/actions/setup-node/issues/531#issuecomment-2960522861 - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - name: Enable Corepack - run: corepack enable - - name: Configure dependency cache - uses: actions/setup-node@v4 - with: - cache: yarn - - name: Install dependencies - run: yarn install --immutable - - - name: Test test tools - run: yarn run test-test