Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate MPT Service #456

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
shard: [1] # Running all test in single run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
#- name: Install Playwright browsers NO need to install browsers for service
#run: npx playwright install --with-deps

- name: Run Playwright tests
run: npx playwright test --shard ${{ matrix.shard }}
working-directory: ./
env:
# Access token and regional endpoint for Microsoft Playwright Testing
PLAYWRIGHT_SERVICE_ACCESS_TOKEN: ${{ secrets.PLAYWRIGHT_SERVICE_ACCESS_TOKEN }}
PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }}
PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}
run: npx playwright test -c playwright.service.config.ts

- name: Upload blob report to GitHub Actions Artifacts
if: always()
Expand All @@ -35,7 +41,7 @@ jobs:

merge-reports:
# Merge reports after playwright-tests, even if some shards have failed
if: always()
if: false # No need to merge
needs: [test]

runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions playwright.service.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const os = process.env.PLAYWRIGHT_SERVICE_OS || 'linux';
export default defineConfig(config, {
// Define more generous timeout for the service operation if necessary.
// timeout: 60000,
// expect: {
// timeout: 10000,
// },
workers: 20,
expect: {
timeout: 20000,
},
workers: 8,

// Enable screenshot testing and configure directory with expectations.
// https://learn.microsoft.com/azure/playwright-testing/how-to-configure-visual-comparisons
Expand Down