From fd63949464e1ab7e777de90e835ac9f90689fb75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20L=C3=A9onard?= <41673755+zmo2s@users.noreply.github.com> Date: Sat, 10 Oct 2026 03:32:47 +0200 Subject: [PATCH 1/2] ci: run Node tests and diff checks on pull requests --- .github/workflows/validate.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..b2ec674 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,24 @@ +name: Validate pull requests + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Run tests + run: npm test + - name: Check whitespace errors in latest commit + run: git diff --check HEAD^ HEAD From 724207e9efa09507a4b5d0e1f8949f5f1cd86145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20L=C3=A9onard?= <41673755+zmo2s@users.noreply.github.com> Date: Sat, 10 Oct 2026 03:32:57 +0200 Subject: [PATCH 2/2] ci: fetch enough history for diff validation --- .github/workflows/validate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b2ec674..77b289a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -14,6 +14,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + with: + fetch-depth: 2 - name: Set up Node.js uses: actions/setup-node@v4 with: