Skip to content
Open
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
36 changes: 29 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@

name: CI

on:
push:
branches: [main]
branches:
- main

pull_request:

workflow_dispatch:

permissions:
contents: read

# Cancel outdated workflow runs for the same branch or PR.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

# Backend test job
backend-tests:
name: Backend Tests
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
working-directory: backend

steps:
- name: Get the code
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
Expand All @@ -29,17 +43,21 @@ jobs:
cache: npm
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
- name: Install backend dependencies
run: npm ci

- name: Run backend tests
run: npm test


# Frontend test job
frontend-tests:
name: Frontend Tests
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Get the code
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
Expand All @@ -51,17 +69,21 @@ jobs:
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
- name: Install frontend dependencies
run: npm ci

- name: Run frontend tests
run: npm test


# Frontend production build job
frontend-build:
name: Frontend Production Build
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Get the code
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
Expand All @@ -73,7 +95,7 @@ jobs:
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
- name: Install frontend dependencies
run: npm ci

- name: Build frontend
Expand Down
Loading