-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (55 loc) · 1.87 KB
/
test.yml
File metadata and controls
69 lines (55 loc) · 1.87 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
64
65
66
67
68
69
name: .NET Unit Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.2-alpine
ports:
- 6543:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Pass@word
POSTGRES_DB: RecordStore
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04
env:
ACCEPT_EULA: Y
SA_PASSWORD: Pass@word
ports:
- 2544:1433
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -warnaserror
- name: Install Entity Framework Tool
run: |
dotnet tool install --global dotnet-ef
dotnet tool restore
- name: Migrate EventSourcing.EF.Tests.Postgres
run: dotnet ef migrations add AddInitialMigration -p EventSourcing.EF.Tests.Postgres
- name: Update EventSourcing.EF.Tests.Postgres
run: dotnet ef database update -p EventSourcing.EF.Tests.Postgres
- name: Migrate EventSourcing.EF.Tests.SqlServer
run: dotnet ef migrations add AddInitialMigration -p EventSourcing.EF.Tests.SqlServer
- name: Update EventSourcing.EF.Tests.SqlServer
run: dotnet ef database update -p EventSourcing.EF.Tests.SqlServer
- name: Update EventSourcing.Example
run: dotnet ef database update -p EventSourcing.Example
- name: Test
run: dotnet test --no-build --verbosity normal
env:
Cosmos__ConnectionString: ${{ secrets.COSMOS_CONNECTIONSTRING }}
Cosmos__Database: ${{ secrets.COSMOS_DATABASE }}
Cosmos__Container: ${{ secrets.COSMOS_CONTAINER }}