Skip to content

test-win

test-win #910

Workflow file for this run

name: test-win
on:
push:
pull_request:
branches: [main, beta]
schedule:
# run daily at 00:00
- cron: 0 0 * * *
jobs:
get-playwright-versions:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
id: get-versions
with:
script: |
const { peerDependencies } = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
const minimalVersion = peerDependencies['@playwright/test'].match(/\d+\.\d+/)[0];
return [ minimalVersion, 'latest', 'beta' ];
outputs:
versions: ${{ steps.get-versions.outputs.result }}
test-win:
needs: get-playwright-versions
runs-on: windows-latest
strategy:
matrix:
playwrightVersion: ${{ fromJson(needs.get-playwright-versions.outputs.versions) }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: >
npm install
@playwright/test@${{ matrix.playwrightVersion }}
@playwright/experimental-ct-react@${{ matrix.playwrightVersion }}
- run: npx playwright install --with-deps chromium
- name: run tests
run: |
# don't use 'npm t' here as it doesn't expand filename wildcards
node test/setup.mjs
node --test test/**/test.mjs
# run particular test
# node --test test/reporter-cucumber-html/test.mjs
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-${{ matrix.playwrightVersion }}
path: |
test/**/test-results/
test/**/actual-reports/
test/**/blob-report/
test/**/.features-gen/
retention-days: 1
if-no-files-found: ignore