fixed test #7
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: Playwright Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Playwright-tests: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps firefox | |
- name: Run Mockoon CLI | |
uses: mockoon/cli-action@v1 | |
with: | |
# Mockoon CLI version, default to 'latest' | |
version: "latest" | |
# Mockoon local data file or URL | |
data-file: "./mockoon/file-test.json" | |
# port, default to 3000 | |
port: 3001 | |
- name: Build | |
run: npm run build | |
- name: Preview build and run Playwright tests | |
run: npm run preview & npx playwright test --project=firefox | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 1 |