feat(ci-pipeline): add Playwright testing job to CI workflow

- Introduced a new Playwright job that runs after the build job.
- Added steps for checking out the repository, setting up Node.js, restoring node_modules from cache, installing dependencies, and installing Playwright browsers.
- Included a step to run Playwright tests, enhancing the CI pipeline with automated testing capabilities.
This commit is contained in:
taroj1205 2025-05-16 12:38:01 +12:00
parent 14c88d32b3
commit 69ca816719
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7

View file

@ -74,4 +74,25 @@ jobs:
node_modules node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Build project - name: Build project
run: npm run build run: npm run build
playwright:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Restore node_modules from cache
uses: actions/cache@v4
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test