-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.15 KB
/
test.yml
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
name: Tests
on:
push:
branches: [ main ]
paths:
- 'CrossBrowser.Test/**'
- 'CrossBrowser/**'
- '!**.md'
- '**.yml'
pull_request:
branches: [ main ]
paths:
- 'CrossBrowser.Test/**'
- 'CrossBrowser/**'
- '!**.md'
- '**.yml'
env:
DOTNET_VERSION: '6.0.x'
TEST_RELEASE_CONFIGURATION: 'Test-Release'
TEST_PROJECT_PATH: CrossBrowser.Test/CrossBrowser.Test.csproj
jobs:
run-test:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install Test dependencies
run: dotnet restore ${{ env.TEST_PROJECT_PATH }}
- name: Build Test
run: dotnet build --configuration ${{ env.TEST_RELEASE_CONFIGURATION}} --no-restore
- name: Run Test
run: dotnet test --configuration ${{ env.TEST_RELEASE_CONFIGURATION}} /p:CollectCoverage=true /p:Exclude="[*]Splat.*" /p:CoverletOutputFormat=opencover --no-restore --verbosity normal
- name: Test Coverage
uses: codecov/codecov-action@v3