Skip to content

Merge pull request #440 from MTES-MCT/feature/436-front-apply-mission… #1340

Merge pull request #440 from MTES-MCT/feature/436-front-apply-mission…

Merge pull request #440 from MTES-MCT/feature/436-front-apply-mission… #1340

name: "[Build & Test] Frontend"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:
schedule:
- cron: "0 3 * * *" # 3am every night
jobs:
build-and-test-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Build Frontend
uses: ./.github/actions/install-and-build-frontend
- name: Analyse dependencies
uses: oke-py/npm-audit-action@v2
with:
audit_level: high
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: lwih
issue_labels: vulnerability,test
dedupe_issues: true
working_directory: frontend
- name: ESLint
run: make front-lint
- name: Tests & Coverage
run: make front-coverage
- name: Report Coverage
# Set if: always() to also generate the report if tests are failing
# Only works if you set `reportOnFailure: true` in your vite config as specified above
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: frontend