forked from MaterialDesignInXAML/MaterialDesignInXamlToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
44 lines (40 loc) · 1.37 KB
/
action.yml
File metadata and controls
44 lines (40 loc) · 1.37 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
name: 'Compile and Test'
description: 'Build the solution and runs the tests'
inputs:
solution:
description: 'The relative path to the solution file'
required: true
buildConfiguration:
description: 'The configuration to use when building'
required: true
nugetKey:
description: The API key to setup with the NUGET_AUTH_TOKEN.
required: false
runs:
using: "composite"
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
3.1.x
5.x
6.x
7.x
env:
NUGET_AUTH_TOKEN: ${{ inputs.nugetToken }}
- name: Restore dependencies
shell: pwsh
run: dotnet restore ${{ inputs.solution }}
- name: Build
shell: pwsh
run: dotnet build ${{ inputs.solution }} --configuration ${{ inputs.buildConfiguration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True
- name: Test
shell: pwsh
run: dotnet test ${{ inputs.solution }} --configuration ${{ inputs.buildConfiguration }} --no-build --verbosity normal --blame-crash
- name: Upload Screenshots
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: Screenshots-${{ github.run_number }}
path: ${{ github.workspace }}/MaterialDesignThemes.UITests/bin/${{ inputs.buildConfiguration }}/net7.0-windows/Screenshots