reverse duplication #15
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Format | |
run: npm run format | |
- name: Lint | |
run: npm run lint | |
- name: Run unit tests with coverage | |
run: npm run coverage | |
- name: Install Playwright browsers | |
run: npx playwright install --with-deps | |
- name: Run e2e tests | |
run: npm run test:e2e | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: | | |
playwright-report/ | |
coverage/ | |
retention-days: 30 | |
- name: Configure Git user | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Generate coverage badges | |
if: github.ref == 'refs/heads/master' | |
uses: jpb06/coverage-badges-action@latest | |
with: | |
coverage-summary-path: coverage/coverage-summary.json | |
branches: master |