Skip to content

Add frontend CI workflow and rename backend workflow file #57

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

Merged
merged 3 commits into from
Jun 23, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'backend/pyproject.toml'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/backend_check.yml'
- '.github/workflows/check_backend.yml'
pull_request:
branches:
- 'main'
Expand All @@ -21,7 +21,7 @@ on:
- 'backend/pyproject.toml'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/backend_check.yml'
- '.github/workflows/check_backend.yml'

jobs:

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
with:
python-version-file: "./backend/pyproject.toml"

- name: Install Black & Ruff with uv
- name: Install Ruff with uv
working-directory: ./backend
run: |
uv sync --only-group ruff
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/check_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Frontend Check

on:
push:
branches:
- '*'
- 'main'
paths:
- 'frontend/**.jsx?'
- 'frontend/**.tsx?'
- 'frontend/**.css'
- 'frontend/**.json'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/check_frontend.yml'
pull_request:
branches:
- 'main'
paths:
- 'frontend/**.jsx?'
- 'frontend/**.tsx?'
- 'frontend/**.css'
- 'frontend/**.json'
- 'Dockerfile*'
- 'docker-compose*.yml'
- '.github/workflows/check_frontend.yml'

jobs:
npm_prod:
name: Run `npm run prod` in production mode
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Set-up Node.js according to .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

- name: Install dependencies
working-directory: frontend
run: |
npm ci

# TODO: Fix ES Lint before enabling this step
# https://eslint.org/docs/latest/use/configure/migration-guide
# - name: Lint the project
# working-directory: frontend
# run: |
# npm run lint

- name: Build frontend
working-directory: frontend
run: |
npm run prod