diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66f0171..3c08aa4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [dev, main] + branches: [dev] pull_request: branches: [main] @@ -32,7 +32,7 @@ jobs: - 'scan_model/**' test-backend: - name: Backend — Jest tests + name: Backend - Jest tests runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.backend == 'true' @@ -55,7 +55,7 @@ jobs: run: npm run test lint-rag: - name: RAG — Ruff lint + name: RAG - Ruff lint runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.rag == 'true' @@ -67,7 +67,7 @@ jobs: src: ./scan_report lint-model: - name: Model — Ruff lint + name: Model - Ruff lint runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.model == 'true' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3636014..b96c084 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,11 +36,58 @@ jobs: model: - 'scan_model/**' - build-backend: - name: Build & push backend image + test-backend: + name: Backend — Jest tests runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.backend == 'true' + defaults: + run: + working-directory: server + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: server/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm run test + + lint-rag: + name: RAG — Ruff lint + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.rag == 'true' + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/ruff-action@v3 + with: + src: ./scan_report + + lint-model: + name: Model — Ruff lint + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.model == 'true' + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/ruff-action@v3 + with: + src: ./scan_model + + build-backend: + name: Build & push backend image + runs-on: ubuntu-latest + needs: [changes, test-backend] + if: needs.test-backend.result == 'success' steps: - uses: actions/checkout@v4 @@ -58,8 +105,8 @@ jobs: build-rag: name: Build & push rag image runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.rag == 'true' + needs: [changes, lint-rag] + if: needs.lint-rag.result == 'success' steps: - uses: actions/checkout@v4 @@ -77,8 +124,8 @@ jobs: build-model: name: Build & push model image runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.model == 'true' + needs: [changes, lint-model] + if: needs.lint-model.result == 'success' steps: - uses: actions/checkout@v4 diff --git a/client/src/features/dashboard/Reports/components/SharePage.tsx b/client/src/features/dashboard/Reports/components/SharePage.tsx index af4c279..d39cfcf 100644 --- a/client/src/features/dashboard/Reports/components/SharePage.tsx +++ b/client/src/features/dashboard/Reports/components/SharePage.tsx @@ -122,66 +122,6 @@ const PromoSection = () => ( ); -// const StickyPromoBanner = () => ( -//
-//
-//
-// -// -// -//
-//
-// -// You're viewing a TumorLens report -// -// -// Analyze your own MRI scans with AI in seconds -// -//
-//
-//
-// -// Get Started Free -// -// -// Sign In -// -//
-//
-// ); - export const SharePage = () => { const { share: token } = ReportsShareRoute.useSearch(); const { data: reportData, isLoading } = useFetchSharedReport(token); diff --git a/client/src/features/dashboard/ScanResults/hooks.ts b/client/src/features/dashboard/ScanResults/hooks.ts index b844e56..ea466c5 100644 --- a/client/src/features/dashboard/ScanResults/hooks.ts +++ b/client/src/features/dashboard/ScanResults/hooks.ts @@ -22,6 +22,7 @@ export const useFetchScanDetail = (id: string) => { return response.data; }, enabled: !!id, + refetchOnMount: 'always', }); } diff --git a/client/src/features/dashboard/ScanResults/index.tsx b/client/src/features/dashboard/ScanResults/index.tsx index 5165fb3..dc65e45 100644 --- a/client/src/features/dashboard/ScanResults/index.tsx +++ b/client/src/features/dashboard/ScanResults/index.tsx @@ -657,19 +657,6 @@ export const ScanResultsPage = () => { ]} /> - {/*