-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.53 KB
/
tests.yml
File metadata and controls
61 lines (48 loc) · 1.53 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
name: Run Project Tests
on:
workflow_call:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "9.0.x"
- name: Run Unit Tests
run: dotnet test PhantomDave.BankTracking.UnitTests/
- name: Run Integration Tests
run: dotnet test PhantomDave.BankTracking.IntegrationTests/
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.13
- name: Install Dependencies
working-directory: frontend
run: bun install --frozen-lockfile
- name: Install Playwright
working-directory: frontend
run: bunx playwright install --with-deps chromium
- name: Start Database
run: docker compose -f compose.dev.yaml up -d database
- name: Start Backend API
run: |
dotnet build PhantomDave.BankTracking.Api/
nohup dotnet run --project PhantomDave.BankTracking.Api/ --urls=http://localhost:5095 > api.log 2>&1 &
- name: Wait for Backend API
run: |
for i in {1..30}; do
if curl -s http://localhost:5095/graphql > /dev/null; then
echo "API is up!"
exit 0
fi
echo "Waiting for API..."
sleep 2
done
echo "API did not start in time" >&2
exit 1
- name: Run E2E Tests
working-directory: frontend
run: bun run test:e2e