-
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (55 loc) · 1.95 KB
/
Copy pathwebsite_frontend_ci.yml
File metadata and controls
63 lines (55 loc) · 1.95 KB
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
name: Run Playwright Website Tests after deploy
on:
workflow_run:
workflows: ["Deploy Website"]
types: [completed]
workflow_dispatch:
env:
WORKING_DIRECTORY: tests/web/Jordnaer.E2E.Tests
AZURE_WEBAPP_NAME: Jordnaer
RESOURCE_GROUP: Jordnaer
jobs:
playwright:
# Only run this if the workflow that triggered it was successful
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/dotnet:v1.54.0-jammy
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
- name: Test
run: >
dotnet test "${{ env.WORKING_DIRECTORY }}"
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--filter Category!=SkipInCi
env:
Playwright_BaseUrl: "https://mini-moeder.dk/"
Playwright_Username: ${{ secrets.Playwright_Username }}
Playwright_Password: ${{ secrets.Playwright_Password }}
- name: Upload Screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: "${{ env.WORKING_DIRECTORY }}/bin/Debug/screenshots"
# We've switched to a cheaper plan, so no need (or ability) to swap slots
# swap-deployment:
# needs: playwright
# runs-on: ubuntu-latest
# concurrency:
# group: Jordnaer-swap
# cancel-in-progress: false
# steps:
# - name: Login to Azure
# uses: azure/login@v2
# with:
# creds: ${{ secrets.MINIMOEDER_AZURE_CREDENTIALS }}
# - name: Swap Slots
# run: >
# az webapp deployment slot swap --name ${{ env.AZURE_WEBAPP_NAME }} --resource-group ${{ env.RESOURCE_GROUP }} --slot staging --target-slot production