This repository was archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 754
78 lines (70 loc) · 1.95 KB
/
podcast-web.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Podcast Web CICD
on:
push:
branches: [main]
paths:
- "src/Web/**"
- ".github/workflows/podcast-web.yml"
- "deploy/Web/web.bicep"
pull_request:
branches: [main]
paths:
- "src/Web/**"
- ".github/workflows/podcast-web.yml"
- "deploy/Web/web.bicep"
workflow_dispatch:
jobs:
buildDeployStaging:
name: "Build and deploy to Staging environment"
if: "!contains(github.ref, 'refs/heads/main')"
uses: ./.github/workflows/template-web.yml
concurrency:
group: staging-web
cancel-in-progress: true
secrets: inherit
with:
environment: staging
buildDeployProd:
name: "Build and deploy main branch to Production environment"
if: contains(github.ref, 'refs/heads/main')
uses: ./.github/workflows/template-web.yml
concurrency:
group: prod-web
cancel-in-progress: true
secrets: inherit
with:
environment: prod
test:
needs: [buildDeployStaging, buildDeployProd]
if: ${{ always() }}
timeout-minutes: 60
runs-on: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.28.1-focal
env:
BASEURL: https://${{secrets.WEBAPP_NAME}}.azurewebsites.net # sets value for URL to test
defaults:
run:
working-directory: src/Web/E2E
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Install dependencies
run: npm ci
- name: Run Playwright tests
run: |
npx playwright install msedge
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