move test job into it's own workflow

pull/153/head
Marcus Felling 2022-09-16 09:50:05 -05:00
parent 78ad53b236
commit aade90ace4
2 changed files with 52 additions and 38 deletions

View File

@ -0,0 +1,51 @@
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

View File

@ -120,40 +120,3 @@ jobs:
with: with:
app-name: ${{ secrets.WEBAPP_NAME }} app-name: ${{ secrets.WEBAPP_NAME }}
package: web package: web
test:
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
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