dotnet-podcasts/.github/workflows/podcast-test.yml

51 lines
1.1 KiB
YAML

name: Podcast Test
on:
push:
branches: [main]
paths:
- "src/Web/E2E/**"
- ".github/workflows/podcast-test.yml"
pull_request:
branches: [main]
paths:
- "src/Web/E2E**"
- ".github/workflows/podcast-test.yml"
workflow_dispatch:
jobs:
test:
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
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
run: npm ci
- name: Run Playwright tests
run: |
HOME=/root npx playwright test
- name: Create test summary
uses: test-summary/action@dist
if: always()
with:
paths: src/Web/E2E/test-results/junit.xml
- name: Upload HTML report
uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: src/Web/E2E/playwright-report/
retention-days: 30