-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.58 KB
/
PR.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
name: 'Treasure.Utils-PR'
on: pull_request
env:
# Stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
build:
name: 'Build Treasure.Utils'
strategy:
max-parallel: 3
fail-fast: false
matrix:
platform: [ windows, ubuntu, macos ]
runs-on: ${{ matrix.platform }}-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
7.x
- name: Patch global.json if necessary
shell: pwsh
run: ./scripts/PatchGlobalJson.ps1
- name: Install dependencies
run: dotnet restore
- name: DotNet Format
run: dotnet format --no-restore --verify-no-changes
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: codecov-${{ matrix.platform }}
directory: __test-results
fail_ci_if_error: true
verbose: true
- name: Upload output artifact
uses: actions/upload-artifact@v3
with:
name: __output_${{ matrix.platform }}
path: __output
- name: Upload packages artifact
uses: actions/upload-artifact@v3
with:
name: __packages_${{ matrix.platform }}
path: __packages