From a3fc8c67007e4061033500fcd38d2ee621684d10 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 6 Jan 2025 11:19:23 +0900 Subject: [PATCH] Remove pre-commit hook and add CI workflow for automated testing --- .githooks/pre-commit | 4 ---- .github/workflows/ci.yml | 12 ++++++++++++ package.json | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) delete mode 100755 .githooks/pre-commit create mode 100644 .github/workflows/ci.yml diff --git a/.githooks/pre-commit b/.githooks/pre-commit deleted file mode 100755 index a5cf514..0000000 --- a/.githooks/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -e -npm run format -npm run test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a31d4ea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +name: ci +on: + push: +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install + run: npm ci + - name: Test + run: npm test diff --git a/package.json b/package.json index 5d80fce..b9512f1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "templates/*" ], "scripts": { - "prepare": "git config core.hooksPath .githooks", "test": "find src -name '*.md' -exec markdown-link-check {} + && node --test 'src/**/*.test.js' && npm test --workspaces", "format": "prettier --write ." },