61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: Frontend Workflow
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
|
|
jobs:
|
|
install-front:
|
|
uses: ./.github/workflows/front-dependencies-installation.yml
|
|
with:
|
|
node_version: "22.x"
|
|
|
|
lint-front:
|
|
runs-on: ubuntu-latest
|
|
needs: install-front
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "22.x"
|
|
- name: Restore the frontend cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: "src/frontend/**/node_modules"
|
|
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Check linting
|
|
run: cd src/frontend/ && yarn lint
|
|
|
|
test-unit:
|
|
runs-on: ubuntu-latest
|
|
needs: install-front
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "22.x"
|
|
|
|
- name: Restore the frontend cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: "src/frontend/**/node_modules"
|
|
key: front-node_modules-${{ hashFiles('src/frontend/**/yarn.lock') }}
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cd src/frontend/apps/calendars
|
|
TZ=Europe/Paris yarn test
|