-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (66 loc) · 2.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build
on:
push:
schedule:
- cron: '1 0 * * 1' # Mondays at 00:01
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
runtime-identifier: linux-x64
- os: windows-latest
runtime-identifier: win-x64
- os: macOS-latest
runtime-identifier: osx-x64
fail-fast: false
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
PROJECT_NAME: Lynx_AzureBotApi
steps:
- uses: actions/checkout@v3
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
include-prerelease: true
- name: Nuget cache
uses: actions/cache@v3
with:
path:
~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build
run: dotnet build -c Release /p:DeterministicBuild=true
- name: Run CI tests
run: dotnet test -c Release --no-build --collect:"XPlat Code Coverage" --logger "console;verbosity=normal"
#- name: '[Ubuntu] Generate test coverage report'
# if: matrix.os == 'ubuntu-latest'
# uses: danielpalme/[email protected]
# with:
# reports: 'tests/**/*.cobertura.xml'
# targetdir: 'coveragereport'
# reporttypes: 'HtmlInline_AzurePipelines_Dark;SonarQube;Cobertura'
# assemblyfilters: '+*'
# classfilters: '+*'
# filefilters: '+*'
# verbosity: 'Info'
# title: '${{ env.PROJECT_NAME }} #${{ github.run_number }} (${{ env.GITHUB_REF_SLUG }})'
# tag: '${{ github.run_number }}_${{ github.run_id }}'
# customSettings: 'numberOfReportsParsedInParallel=3;numberOfReportsMergedInParallel=3'
#- name: '[Ubuntu] Upload test coverage report'
# if: matrix.os == 'ubuntu-latest'
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.PROJECT_NAME }}-build-coverage-ci-${{ github.run_number }}
# path: coveragereport/
# if-no-files-found: error
- name: Publish API
run: dotnet publish src/Lynx.AzureBotApi/Lynx.AzureBotApi.csproj -c Release --runtime ${{ matrix.runtime-identifier }} --self-contained -o artifacts/${{ matrix.runtime-identifier }}