Merge pull request #344 from MTES-MCT/feature/335-saisie-de-control-env #1015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |