-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (40 loc) · 1.64 KB
/
dotnet.yml
File metadata and controls
43 lines (40 loc) · 1.64 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
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ "**" ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- test-project: Core/Cleipnir.ResilientFunctions.Tests
compose-service: ''
- test-project: Stores/MariaDB/Cleipnir.ResilientFunctions.MariaDB.Tests
compose-service: maria-db
db-name: mariadb
- test-project: Stores/PostgreSQL/Cleipnir.ResilientFunctions.PostgreSQL.Tests
compose-service: postgresql-db
db-name: postgres
- test-project: Stores/SqlServer/Cleipnir.ResilientFunctions.SqlServer.Tests
compose-service: sql-server-db
db-name: sqlserver
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- run: dotnet build Cleipnir.ResilientFunctions.sln
- if: matrix.compose-service != ''
run: docker compose up -d ${{ matrix.compose-service }}
- if: matrix.compose-service != ''
run: dotnet run --project ./Stores/EnsureDatabaseConnections/EnsureDatabaseConnections.csproj --no-build -- ${{ matrix.db-name }}
- run: dotnet test ./${{ matrix.test-project }} --no-build --logger "console;verbosity=detailed"
- if: always() && matrix.compose-service != ''
run: docker compose down