move test job into it's own workflow
parent
78ad53b236
commit
aade90ace4
|
@ -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
|
|
@ -119,41 +119,4 @@ jobs:
|
|||
uses: Azure/webapps-deploy@v2
|
||||
with:
|
||||
app-name: ${{ secrets.WEBAPP_NAME }}
|
||||
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
|
||||
package: web
|
Loading…
Reference in New Issue