forked from rajyraman/Dataverse-LINQPad-Driver
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (83 loc) · 2.64 KB
/
build.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: ".NET"
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
permissions:
contents: read
id-token: write
checks: write
pull-requests: write
env:
PROJECT_NAME: NY.Dataverse.LINQPadDriver
PROJECT_SOURCE_ROOT: src
jobs:
spellcheck:
runs-on: ubuntu-latest
name: "📝🔥 Spellcheck"
steps:
- uses: actions/checkout@v4
name: 📤 Checkout
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-node@v4
name: 📦 Setup Node
- uses: streetsidesoftware/cspell-action@v6
name: 📝 Check Spelling
with:
config: cspell.config.yaml
files: "**"
verbose: true
incremental_files_only: false
build:
needs: spellcheck
strategy:
fail-fast: true
matrix:
dotnet: [8.x]
os: [windows-latest]
runtime: [win-x64]
config: [Debug, Release]
runs-on: ${{ matrix.os }}
# Build: dotnet-8.x, win-x64, Debug
name: "🪟🔥 Build | ${{ matrix.config }}"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore dependencies
run: >
dotnet restore --locked-mode
"${{ env.PROJECT_NAME }}.sln"
# The '--graph' parameter is to address an occasional build error about files being
# used by another process the during 'GenerateRuntimeConfigurationFiles'
# task: https://github.com/dotnet/msbuild/issues/6690#issuecomment-1553272562
- name: Build
run: >
dotnet build
--configuration "${{ matrix.config }}"
--runtime "${{ matrix.runtime }}"
--verbosity normal
--graph
"${{ env.PROJECT_SOURCE_ROOT }}/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj"
- name: Test
run: >
dotnet test
--configuration "${{ matrix.config }}"
--runtime "${{ matrix.runtime }}"
--verbosity normal
--results-directory:"./TestResults/${{ matrix.dotnet }}-${{ matrix.runtime }}-${{ matrix.config }}"
--logger:trx
"src/MarkMpn.FetchXmlToWebAPI/MarkMpn.FetchXmlToWebAPI.Tests/MarkMpn.FetchXmlToWebAPI.Tests.csproj"
- uses: bibipkins/dotnet-test-reporter@v1.4.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: "Unit Test Results"
results-path: "./TestResults/${{ matrix.dotnet }}-${{ matrix.runtime }}-${{ matrix.config }}/*.trx"