update to use 1.46 #290
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: demo.playwright | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
accessibilityTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: accessibility | |
BASEURL: https://playwright.dev/docs/accessibility-testing | |
androidTests: | |
name: "android tests" | |
if: ${{ false }} # disable for experimental | |
timeout-minutes: 60 | |
runs-on: macos-12 | |
env: | |
TESTGROUP: android | |
environment: | |
name: android | |
url: https://testresults.marcusfelling.com/${{ env.TESTGROUP }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: run tests | |
uses: ReactiveCircus/[email protected] | |
with: | |
working-directory: android | |
api-level: 31 | |
target: "google_apis" | |
script: | | |
adb root | |
adb devices | |
npx playwright install android | |
HOME=/root npx playwright test | |
- name: Upload HTML report as artifact. To troubleshoot failures, extract .zip and double-click index.html. | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ env.TESTGROUP }} | |
path: | | |
playwright-report | |
chromeExtensionTests: | |
name: "chrome-extension tests" | |
timeout-minutes: 60 | |
runs-on: macos-12 | |
env: | |
TESTGROUP: chrome-extension | |
environment: | |
name: chrome-extension | |
url: https://testresults.marcusfelling.com/${{ env.TESTGROUP }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ${{ env.TESTGROUP }} Tests | |
continue-on-error: false | |
working-directory: ${{ env.TESTGROUP }} | |
run: | | |
npx playwright install | |
# Extensions only work in Chrome / Chromium in non-headless mode. | |
npx playwright test --headed --project=chromium | |
- name: Upload HTML report as artifact. To troubleshoot failures, extract .zip and double-click index.html. | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ env.TESTGROUP }} | |
path: | | |
playwright-report | |
dragAndDropTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: drag-and-drop | |
BASEURL: https://www.w3schools.com/html/html5_draganddrop.asp | |
fixturesTests: | |
name: "fixtures tests" | |
timeout-minutes: 60 | |
runs-on: ubuntu-24.04 | |
container: | |
image: mcr.microsoft.com/playwright:v1.46.0-jammy | |
env: | |
TESTGROUP: fixtures | |
environment: | |
name: fixtures | |
url: https://testresults.marcusfelling.com/${{ env.TESTGROUP }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ${{ env.TESTGROUP }} Tests | |
continue-on-error: false | |
working-directory: ${{ env.TESTGROUP }} | |
run: | | |
npx playwright install | |
HOME=/root npx playwright test test-fixture.spec.ts | |
- name: Upload HTML report as artifact. To troubleshoot failures, extract .zip and double-click index.html. | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ env.TESTGROUP }} | |
path: | | |
playwright-report | |
githubAPITests: | |
name: "github-api tests" | |
timeout-minutes: 60 | |
runs-on: ubuntu-24.04 | |
container: | |
image: mcr.microsoft.com/playwright:v1.46.0-jammy | |
env: | |
TESTGROUP: github-api | |
BASEURL: https://api.github.com # Playwright tests use this for baseURL | |
GITHUB_USER: ${{ secrets.REPO_USER }} | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
environment: | |
name: github-api | |
url: https://testresults.marcusfelling.com/${{ env.TESTGROUP }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ${{ env.TESTGROUP }} Tests | |
continue-on-error: false | |
working-directory: ${{ env.TESTGROUP }} | |
run: | | |
npx playwright install | |
HOME=/root npx playwright test | |
- name: Upload HTML report as artifact. To troubleshoot failures, extract .zip and double-click index.html. | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ env.TESTGROUP }} | |
path: playwright-report | |
oauthTests: | |
name: "oauth tests" | |
timeout-minutes: 60 | |
if: ${{ false }} # disable for now for bot detection | |
runs-on: ubuntu-24.04 | |
container: | |
image: mcr.microsoft.com/playwright:v1.46.0-jammy | |
env: | |
TESTGROUP: oauth | |
BASEURL: https://courses.ultimateqa.com/users/sign_in # Playwright tests use this for baseURL | |
GMAIL_USER: ${{ secrets.GMAIL_USER }} | |
OUTLOOK_USER: ${{ secrets.OUTLOOK_USER }} | |
PW_PWD: ${{ secrets.PW_PWD }} | |
environment: | |
name: oauth | |
url: https://testresults.marcusfelling.com/${{ env.TESTGROUP }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
cache-dependency-path: package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ${{ env.TESTGROUP }} Tests | |
continue-on-error: false | |
working-directory: ${{ env.TESTGROUP }} | |
run: | | |
npx playwright install | |
HOME=/root npx playwright test | |
- name: Upload HTML report as artifact. To troubleshoot failures, extract .zip and double-click index.html. | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ env.TESTGROUP }} | |
path: | | |
playwright-report | |
performanceTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: performance | |
BASEURL: https://fastestwebsite.net/ | |
svgomgTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: svgomg | |
BASEURL: https://demo.playwright.dev/svgomg | |
todomvcTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: todomvc | |
BASEURL: https://demo.playwright.dev/todomvc | |
visualComparisonTests: | |
uses: ./.github/workflows/template-test.yml | |
with: | |
TESTGROUP: visual-comparison | |
BASEURL: https://playwright.dev |