From c45e258f7da5a82547d1d35f88742b3cf13b902c Mon Sep 17 00:00:00 2001 From: Mikhail Golbakh Date: Mon, 29 Jul 2024 10:17:51 +0200 Subject: [PATCH] ci: add job for unit tests (#3) --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- package.json | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e8c881..6889569 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,8 @@ on: - '**' jobs: - precommit: - name: Precommit checks + lint_and_typecheck: + name: Lint & Typecheck runs-on: ubuntu-latest steps: - name: Checkout @@ -27,3 +27,19 @@ jobs: run: npm run lint - name: Typecheck run: npm run typecheck + + unit_tests: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - name: Install Packages + run: npm ci + - name: Run Tests + run: npm run test diff --git a/package.json b/package.json index 0b40b7d..c98bf83 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "deps:ci": "npm ci", "lint": "eslint .", "lint:fix": "npm run lint -- --fix", - "prepare": "husky install", + "prepare": "husky", "prepublishOnly": "npm run build", "test": "jest --passWithNoTests", "typecheck": "tsc --noEmit"