CI updates for Playwright
parent
7b7d76d540
commit
e8167ce286
|
@ -125,6 +125,9 @@ jobs:
|
|||
needs: deploy
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright:v1.25.2-focal
|
||||
env:
|
||||
BASEURL: https://${{secrets.WEBAPP_NAME}}.azurewebsites.net
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src/Web/E2E
|
||||
|
@ -133,13 +136,21 @@ jobs:
|
|||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: npx playwright test
|
||||
- uses: actions/upload-artifact@v2
|
||||
|
||||
- name: Create test summary
|
||||
uses: test-summary/action@dist
|
||||
if: always()
|
||||
with:
|
||||
paths: test-results/junit.xml
|
||||
|
||||
- name: Upload HTML report
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
|
|
|
@ -13,6 +13,7 @@ products:
|
|||
- azure-container-apps
|
||||
- azure-container-registry
|
||||
- azure-app-service-web
|
||||
- playwright
|
||||
---
|
||||
|
||||
# .NET Podcasts - Sample Application
|
||||
|
|
|
@ -30,13 +30,16 @@ const config: PlaywrightTestConfig = {
|
|||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: process.env.CI ? [['github'], ['html']] : 'list',
|
||||
reporter: [
|
||||
['html'],
|
||||
['junit', { outputFile: './test-results/junit.xml' }],
|
||||
],
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
||||
actionTimeout: 0,
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
baseURL: 'https://mafellin-podcastwebapp.azurewebsites.net/',
|
||||
baseURL: process.env.BASEURL,
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on',
|
||||
|
|
Loading…
Reference in New Issue