Skip to content

Commit

Permalink
update frontend workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashSDas committed Aug 11, 2024
1 parent df26335 commit 66f22c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 32 deletions.
52 changes: 21 additions & 31 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
jobs:
build:
name: Build
defaults:
run:
working-directory: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,19 +21,17 @@ jobs:
node-version: "20"
cache: "npm"
- run: npm install -g pnpm
- name: Install dependencies
working-directory: frontend
run: pnpm install
- name: Build
working-directory: frontend
run: pnpm build
- name: Archive build output
uses: actions/upload-artifact@v4
- run: pnpm install
- run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: build
path: frontend/dist
test:
name: Test
defaults:
run:
working-directory: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -39,41 +40,30 @@ jobs:
node-version: "20"
cache: "npm"
- run: npm install -g pnpm
- name: Install dependencies
working-directory: frontend
run: pnpm install
- name: Run tests
working-directory: frontend
run: pnpm test
- name: Run coverage report
working-directory: frontend
run: pnpm test:cov
- name: Generate code coverage
uses: actions/upload-artifact@v4
- run: pnpm install
- run: pnpm test
- run: pnpm test:cov
- uses: actions/upload-artifact@v4
with:
name: coverage-report
path: frontend/test
end-to-end-test:
name: End-to-End Test
defaults:
run:
working-directory: frontend
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "npm"
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
working-directory: frontend
run: pnpm install
- name: Install Playwright Browsers
working-directory: frontend
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
working-directory: frontend
run: pnpm exec playwright test
- run: npm install -g pnpm
- run: pnpm install
- run: pnpm exec playwright install --with-deps
- run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Layout } from "@app/components/shared/layout/Layout";
import { fontStyles } from "@app/utils/fonts";
import { Text } from "@chakra-ui/react";
import Head from "next/head";

//
export default function NotFoundPage() {
return (
<>
Expand Down

0 comments on commit 66f22c6

Please sign in to comment.