-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (42 loc) · 1.31 KB
/
run_tests.yml
File metadata and controls
53 lines (42 loc) · 1.31 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
name: Run tests
on:
pull_request:
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Set timestamp variable
id: timestamp
run: echo "datetime=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_OUTPUT
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.101'
- name: Install wasm-tools
run: dotnet workload install wasm-tools
- name: Restore & Build
run: dotnet build
- name: Install Playwright Browsers
run: |
dotnet tool restore
dotnet playwright install --with-deps
- name: Start App
run: ASPNETCORE_ENVIRONMENT=Development dotnet run --project AudioCuesheetEditor &
- name: Wait for app to be ready
run: |
for i in {1..30}; do
curl -sSf http://localhost:5132/ && echo "App is up!" && exit 0
echo "Waiting for app..."
sleep 2
done
echo "App failed to start" && exit 1
- name: Run tests
run: dotnet test
- name: Upload traces
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-traces-${{ steps.timestamp.outputs.datetime }}
path: AudioCuesheetEditor.End2EndTests/bin/Debug/net9.0/playwright-traces/
if-no-files-found: ignore