From 80d86ad76a89eceba42834032e3bd854965d8399 Mon Sep 17 00:00:00 2001 From: bashfullad78 Date: Sat, 10 Oct 2026 14:40:26 +0200 Subject: [PATCH] ci: add pull request checks --- .github/workflows/pull-request-checks.yml | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pull-request-checks.yml diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml new file mode 100644 index 0000000..52eadbc --- /dev/null +++ b/.github/workflows/pull-request-checks.yml @@ -0,0 +1,32 @@ +name: Pull Request Checks + +on: + pull_request: + +permissions: + contents: read + +jobs: + checks: + name: Tests and whitespace + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Run tests + run: npm test + + - name: Check pull request diff + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: git diff --check "$BASE_SHA" "$HEAD_SHA"