feat: typecheck gh action

This commit is contained in:
Ahmed Bouhuolia
2025-10-18 18:48:03 +02:00
parent e4f51fb8a1
commit e548e7dc4a
5 changed files with 60 additions and 1 deletions

57
.github/workflows/typecheck.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: TypeCheck
on:
push:
branches:
- main
- develop
paths:
- '**.ts'
- '**.tsx'
- '**/tsconfig.json'
- '**/tsconfig.*.json'
- 'pnpm-lock.yaml'
- 'package.json'
- 'packages/*/package.json'
- '.github/workflows/typecheck.yml'
pull_request:
paths:
- '**.ts'
- '**.tsx'
- '**/tsconfig.json'
- '**/tsconfig.*.json'
- 'pnpm-lock.yaml'
- 'package.json'
- 'packages/*/package.json'
- '.github/workflows/typecheck.yml'
defaults:
run:
shell: 'bash'
jobs:
typecheck:
name: TypeScript Type Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run TypeScript type check
run: pnpm run typecheck

View File

@@ -4,6 +4,7 @@
"scripts": {
"dev": "lerna run dev",
"build": "lerna run build",
"typecheck": "lerna run typecheck",
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\" --scope \"@bigcapital/utils\" --scope \"@bigcapital/pdf-templates\"",
"build:webapp": "lerna run build --scope \"@bigcapital/webapp\" --scope \"@bigcapital/utils\" --scope \"@bigcapital/pdf-templates\"",
"dev:server": "lerna run dev --scope \"@bigcapital/server\" --scope \"@bigcapital/utils\" --scope \"@bigcapital/pdf-templates\" --scope \"@bigcapital/email-components\"",

View File

@@ -13,6 +13,7 @@
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"typecheck": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",

View File

@@ -16,7 +16,6 @@ describe('AppController', () => {
describe('root', () => {
it('should return "Hello World!"', () => {
expect(appController.getHello()).toBe('Hello World!');
});
});
});

View File

@@ -131,6 +131,7 @@
"scripts": {
"dev": "cross-env PORT=4000 craco start",
"build": "craco build",
"typecheck": "tsc --noEmit",
"test": "node scripts/test.js",
"storybook": "start-storybook -p 6006"
},