-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.53 KB
/
github-actions-ci.yaml
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
name: Continuous Integration
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "releases/**" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup NuGet
uses: nuget/setup-nuget@v2
- name: Restore NuGet packages
run: nuget restore PosInformatique.Testing.Databases.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
run: msbuild "PosInformatique.Testing.Databases.sln" /p:Configuration=Debug
- name: Restore NuGet packages
run: nuget restore "samples/PosInformatique.Testing.Databases.Samples.sln"
- name: Build the samples
run: msbuild "samples/PosInformatique.Testing.Databases.Samples.sln" /p:Configuration=Debug
- name: Creates the LocalDB for the tests
shell: cmd
run: SqlLocalDB create posinfo-tests
- name: Creates the SQL Login service accounts for the tests
shell: cmd
run: sqlcmd -S "(localDB)\posinfo-tests" -Q "IF NOT EXISTS (SELECT 1 FROM [sys].[server_principals] WHERE [Name] = 'ServiceAccountLogin') CREATE LOGIN [ServiceAccountLogin] WITH PASSWORD = 'P@ssw0rd'"
# Use this fix https://github.com/microsoft/vstest-action/issues/31#issuecomment-2159463764
- name: Test with the dotnet CLI
uses: rusty-bender/vstest-action@main
with:
searchFolder: .\
testAssembly: |
/tests/**/*tests.dll
!./**/*TestAdapter.dll
!./**/obj/**