Main #42
This file contains hidden or 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: Run Tests | |
| on: | |
| push: | |
| branches: [ dev , main ] # mettez les branches que vous souhaitez surveiller | |
| pull_request: | |
| branches: [ dev , main ] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Fix ESLint permissions | |
| run: chmod +x ./node_modules/.bin/eslint | |
| - name: Lint code | |
| run: npx eslint --config workflow/linter/eslint.config.mjs . | |
| - name: Run Vitest unit tests | |
| run: npm test -- --run | |
| - name: Run Vitest with coverage | |
| run: npm run test:coverage | |
| - name: Run Playwright E2E tests | |
| run: npm run test:e2e | |