From b3691ceb146db37ec845f0b18ac2e384e6032dd0 Mon Sep 17 00:00:00 2001 From: Roman Zabaluev Date: Thu, 7 Mar 2024 19:37:54 +0700 Subject: [PATCH] FE: Build fix, add tsc to build goal (#191) --- .github/workflows/frontend_tests.yml | 12 ++++++++++-- frontend/package.json | 3 ++- .../common/NewTable/__test__/Table.spec.tsx | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/frontend_tests.yml b/.github/workflows/frontend_tests.yml index 4be3239d4..10d5fd4cb 100644 --- a/.github/workflows/frontend_tests.yml +++ b/.github/workflows/frontend_tests.yml @@ -13,37 +13,45 @@ jobs: NODE_ENV: dev runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 with: # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} token: ${{ github.token }} + - uses: pnpm/action-setup@v3.0.0 with: version: 8.6.12 + - name: Install node uses: actions/setup-node@v4.0.1 with: node-version: "18.17.1" cache: "pnpm" cache-dependency-path: "./frontend/pnpm-lock.yaml" + - name: Install Node dependencies run: | cd frontend/ pnpm install --frozen-lockfile - - name: Generate sources + + - name: Compile run: | cd frontend/ - pnpm gen:sources + pnpm compile + - name: Linter run: | cd frontend/ pnpm lint:CI + - name: Tests run: | cd frontend/ pnpm test:CI + - name: SonarCloud Scan if: false # TODO remove when public uses: sonarsource/sonarcloud-github-action@master diff --git a/frontend/package.json b/frontend/package.json index 540c85a88..8a0d936cd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -51,8 +51,9 @@ "start": "vite", "dev": "vite", "clean": "rimraf ./src/generated-sources", + "compile": "pnpm gen:sources && tsc --noEmit", "gen:sources": "pnpm clean && openapi-generator-cli generate", - "build": "pnpm gen:sources && tsc --noEmit && vite build", + "build": "pnpm compile && vite build", "preview": "vite preview", "lint": "eslint --ext .tsx,.ts src/", "lint:fix": "eslint --ext .tsx,.ts src/ --fix", diff --git a/frontend/src/components/common/NewTable/__test__/Table.spec.tsx b/frontend/src/components/common/NewTable/__test__/Table.spec.tsx index b22e7c0ec..e31a88846 100644 --- a/frontend/src/components/common/NewTable/__test__/Table.spec.tsx +++ b/frontend/src/components/common/NewTable/__test__/Table.spec.tsx @@ -94,7 +94,7 @@ const columns: ColumnDef[] = [ const ExpandedRow: React.FC = () =>
I am expanded row
; -interface Props extends TableProps { +interface Props extends TableProps { path?: string; }