Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/add ci frontend #9

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Content of the PR

> Describe what this PR does and why

## How did you test ?

> How did you verify that your work change and one can other verify it


43 changes: 43 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# https://turbo.build/repo/docs/ci/github-actions

name: Test Frontend CI

on:
pull_request:
branches:
- main
paths:
- 'frontend/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Cache node modules
uses: actions/cache@v4
with:
path: frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/frontend/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
working-directory: frontend
run: yarn install

- name: Run lint
working-directory: frontend
run: yarn lint

- name: Run build
working-directory: frontend
run: yarn build
4 changes: 3 additions & 1 deletion frontend/src/app/epd/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export default function SearchApp() {
{results.map((result) => (
<li key={result.id} className="border-b pb-2">
<h3 className="font-semibold">{result.title}</h3>
<p className="text-sm text-gray-600">{result.description}</p>
<p className="text-sm text-gray-600">
{result.functionalUnit}
</p>
</li>
))}
</ul>
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ export default function SearchApp() {

<Accordion type="multiple" className="flex flex-col gap-4 py-4">
{results.map((result) => (
<AccordionItem value={result.id} className="flex flex-col">
<Card key={result.id} className="flex flex-col">
<AccordionItem
value={result.id}
className="flex flex-col"
key={result.id}
>
<Card className="flex flex-col">
<AccordionTrigger>
<div className="flex w-3/5 p-6">
<CardTitle className="truncate hover:z-10 hover:overflow-visible hover:text-clip hover:bg-background hover:underline">
Expand All @@ -91,7 +95,7 @@ export default function SearchApp() {
<br />
<br />
<span className="font-semibold">
Performance principale de l'UF (U.F.):{' '}
Performance principale de l&apos;UF (U.F.):{' '}
</span>{' '}
{result.mainPerformance}
<br />
Expand Down
File renamed without changes.