From e63fff5b97756979403b139bc480613c545727c1 Mon Sep 17 00:00:00 2001 From: Mohammad Kermani Date: Sat, 8 Mar 2025 11:06:16 +0000 Subject: [PATCH] feat: add type-checking to CI --- .github/workflows/lint-and-typecheck.yml | 47 ++++++++++++++++++++++++ .github/workflows/lint.yml | 25 ------------- 2 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/lint-and-typecheck.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint-and-typecheck.yml b/.github/workflows/lint-and-typecheck.yml new file mode 100644 index 0000000..b201d76 --- /dev/null +++ b/.github/workflows/lint-and-typecheck.yml @@ -0,0 +1,47 @@ +name: Lint and Typechecking +on: + pull_request: + branches: ['main', 'dev'] + +jobs: + lint: + runs-on: ubuntu-22.04 + strategy: + matrix: + node-version: [20] + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Run lint + run: pnpm lint + + type-check: + runs-on: ubuntu-22.04 + strategy: + matrix: + node-version: [20] + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Run Typecheck + run: pnpm type-check diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 5b6e442..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Lint -on: - push: - -jobs: - build: - runs-on: ubuntu-22.04 - strategy: - matrix: - node-version: [20] - steps: - - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - name: Install dependencies - run: pnpm install - - name: Run lint - run: pnpm lint \ No newline at end of file