From 59915ef2db9218893438661a1cb6e6cc12daf25d Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Sat, 25 Nov 2023 01:23:22 -0500 Subject: [PATCH] Add type-checking and unit tests to CI. --- .../{linting-and-formatting.yml => on-push.yml} | 9 +++++---- package.json | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) rename .github/workflows/{linting-and-formatting.yml => on-push.yml} (74%) diff --git a/.github/workflows/linting-and-formatting.yml b/.github/workflows/on-push.yml similarity index 74% rename from .github/workflows/linting-and-formatting.yml rename to .github/workflows/on-push.yml index 1becbfc..72d5bd2 100644 --- a/.github/workflows/linting-and-formatting.yml +++ b/.github/workflows/on-push.yml @@ -1,10 +1,7 @@ -name: Check linting and formatting - on: push jobs: - check-linting-and-formatting: - name: Check linting and formatting + on-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -14,7 +11,11 @@ jobs: cache: npm - run: | npm install + - run: | + npm run type-check - run: | npm run lint - run: | npm run format-check + - run: | + npm run test diff --git a/package.json b/package.json index 34808b4..972efed 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,12 @@ }, "scripts": { "dev": "vite", + "preview": "vite preview", "build": "tsc && vite build", + "type-check": "tsc", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "format": "prettier --write .", "format-check": "prettier --check .", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview", "test": "vitest" }, "browserslist": {