From b8abec231873784364adcebc0187bb9380889ea3 Mon Sep 17 00:00:00 2001 From: Max Hauser Date: Fri, 29 Sep 2023 11:54:59 +0200 Subject: [PATCH] check ts files for errors on CI (#2136) - and introduced error for testing --- .github/workflows/test-and-release.yml | 18 ++++++++++++++++-- src/package.json | 5 +++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 08cc365a7..42251e927 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -29,8 +29,22 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18.x - - run: npm i - - run: NODE_OPTIONS=--max_old_space_size=4096 npm run build + + - name: 'Install' + run: npm i + + - name: 'Install FE' + run: | + cd src + npm i --force + + - name: Check TypeScript files + run: | + cd src + npm run check-ts + + - name: 'Build' + run: NODE_OPTIONS=--max_old_space_size=4096 npm run build # Runs adapter tests on all supported node versions and OSes adapter-tests: diff --git a/src/package.json b/src/package.json index f64f2e202..b2066df4f 100644 --- a/src/package.json +++ b/src/package.json @@ -78,10 +78,11 @@ "scripts": { "start": "set DANGEROUSLY_DISABLE_HOST_CHECK=true&& craco start", "old-start": "react-scripts start", - "lint": "eslint --fix --ext .js,.jsx src", + "lint": "eslint --fix --ext .js,.jsx,.tsx src", "build": "craco build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "check-ts": "tsc --noEmit --checkJS false" }, "eslintConfig": { "extends": "react-app"