Merge pull request #14 from Hkaar/project-page #40
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 | |
- dev | |
paths-ignore: | |
- "**.md" | |
- "LICENSE" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: Cache npm modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
!~/.npm/_logs | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
npm- | |
- name: Install dependecies | |
run: npm install | |
- name: Run Linter | |
run: npm run lint | |
unit-test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: Cache npm modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
!~/.npm/_logs | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
npm- | |
- name: Install dependecies | |
run: npm install | |
- name: Run tests | |
run: npm run test -- --run | |
e2e-test: | |
name: End to End Tests | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm ci | |
- name: Build app | |
run: npm run build | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |