-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (70 loc) · 2.4 KB
/
Copy pathci.yml
File metadata and controls
86 lines (70 loc) · 2.4 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # MinVer needs the full history to derive the version
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
with:
global-json-file: global.json
- name: Restore
run: dotnet restore ConfigLens.slnx
- name: Build
run: dotnet build ConfigLens.slnx --no-restore --configuration Release
- name: Test
run: >
dotnet test ConfigLens.slnx --no-build --configuration Release
--collect:"XPlat Code Coverage"
--results-directory TestResults
- name: Upload coverage results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: coverage-${{ matrix.os }}
path: TestResults/**/coverage.cobertura.xml
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
with:
global-json-file: global.json
- name: Verify formatting
run: dotnet format ConfigLens.slnx --verify-no-changes
pack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # MinVer needs the full history to derive the version
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
with:
global-json-file: global.json
- name: Pack dotnet tool
run: dotnet pack src/ConfigLens.Cli/ConfigLens.Cli.csproj --configuration Release --output artifacts
- name: Upload package
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: nuget-package
path: artifacts/*.nupkg