-
Notifications
You must be signed in to change notification settings - Fork 24
60 lines (57 loc) · 1.52 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allow manually triggering the workflow.
workflow_dispatch:
permissions: read-all
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Set up .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
- name: Set up MSBuild
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1
with:
msbuild-architecture: x64
- name: Build
run: |
dotnet --info
dotnet build -c Release
msbuild -version
msbuild samples/OwinSample/OwinSample.csproj -noLogo -verbosity:minimal -restore
- name: Build static assets
if: matrix.os == 'ubuntu-latest'
run: |
corepack enable
cd samples/AspNetCoreReactSample/ClientApp
yarn --version
yarn install --immutable
yarn lint
yarn build
- name: Test
run: |
dotnet test --collect:"XPlat Code Coverage"
dotnet tool restore
dotnet tool run reportgenerator "-reports:**/coverage.cobertura.xml" "-targetdir:coverlet/reports" "-reporttypes:Cobertura"
- uses: codecov/codecov-action@v3
with:
name: unittests-${{ matrix.os }}