test: add framework for e2e testing via playwright (#20) #65
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: Continuous Integration | |
on: push | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Check | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: "npm" | |
- run: npm ci | |
- run: npm run check | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: "npm" | |
- run: npm ci | |
- run: npm run test | |
e2e: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
env: | |
VITE_PAGE_NAME: ${{ vars.VITE_PAGE_NAME }} | |
VITE_API_URL: ${{ vars.VITE_API_URL }} | |
VITE_CARD_IMAGE_URL: ${{ vars.VITE_CARD_IMAGE_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: "npm" | |
- run: npm ci | |
- run: npm run prepare:e2e | |
- run: npm run test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ |