Skip to content

Commit 40b4d95

Browse files
committed
ci: run tests
1 parent bbf8770 commit 40b4d95

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: .NET Core Build with Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
# use ubuntu for more build minutes
12+
runs-on: ubuntu-latest
13+
# use release mode for all steps
14+
env:
15+
config: 'Debug'
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET Core
20+
uses: actions/setup-dotnet@v2
21+
with:
22+
dotnet-version: '8.0.x'
23+
24+
- name: Install dependencies
25+
run: |
26+
docker compose -f test-database/docker-compose.yml pull
27+
cd src
28+
dotnet restore
29+
- name: Build
30+
run: |
31+
cd src
32+
dotnet build --configuration $config --no-restore
33+
- name: Test
34+
run: |
35+
docker compose -f test-database/docker-compose.yml up -d
36+
cd src
37+
dotnet test -l "console;verbosity=detailed"

0 commit comments

Comments
 (0)