Cassus component tests #190
Workflow file for this run
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: test | |
on: | |
push: | |
branches: [main, beta] | |
pull_request: | |
branches: [main, beta] | |
jobs: | |
get-playwright-versions: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
id: get-versions | |
with: | |
script: | | |
const minimalVersion = '1.33'; | |
const { execSync } = require('node:child_process'); | |
const info = execSync('npm show --json @playwright/test').toString(); | |
const { versions } = JSON.parse(info); | |
return versions | |
.filter((v) => v.match(/\.0$/) && v >= minimalVersion) | |
.map((v) => v.replace(/\.0$/, '')); | |
outputs: | |
versions: ${{ steps.get-versions.outputs.result }} | |
test: | |
needs: get-playwright-versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
playwrightVersion: ${{ fromJson(needs.get-playwright-versions.outputs.versions) }} | |
cucumberVersion: ['9'] | |
include: | |
- playwrightVersion: '1.37' | |
cucumberVersion: '10' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- run: npm install @playwright/test@${{ matrix.playwrightVersion }} @cucumber/cucumber@${{ matrix.cucumberVersion }} | |
- run: npx playwright install --with-deps chromium | |
- run: npx cross-env FORBID_ONLY=1 npm test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: test-results | |
path: test/**/test-results/ | |
retention-days: 10 | |
if-no-files-found: ignore | |
examples: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [16, 18, 20] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npx playwright install --with-deps chromium | |
- run: npm run examples |