-
Notifications
You must be signed in to change notification settings - Fork 65
78 lines (68 loc) · 2.46 KB
/
tools-tests.yml
File metadata and controls
78 lines (68 loc) · 2.46 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
name: Tools Tests
on:
push:
branches: [ main ]
paths:
- src/tools/**
- tests/**
- .github/workflows/tools-tests.yml
pull_request:
branches: [ main ]
paths:
- src/tools/**
- tests/**
- .github/workflows/tools-tests.yml
workflow_dispatch:
permissions:
contents: read
jobs:
tools-generator-tests:
name: Tools Generator Tests
runs-on: ubuntu-latest
env:
TEST_RESULTS_DIR: ${{ github.workspace }}/testresults
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: Restore tests
run: |
dotnet restore tests/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj
dotnet restore tests/AtsJsonGenerator.Tests/AtsJsonGenerator.Tests.csproj
- name: Run PackageJsonGenerator tests
run: >
dotnet test tests/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj
--configuration Release
--no-restore
--verbosity normal
--results-directory "$TEST_RESULTS_DIR"
--logger "trx;LogFileName=PackageJsonGenerator.Tests.trx"
-bl:"$TEST_RESULTS_DIR/PackageJsonGenerator.Tests.binlog"
- name: Run AtsJsonGenerator tests
run: >
dotnet test tests/AtsJsonGenerator.Tests/AtsJsonGenerator.Tests.csproj
--configuration Release
--no-restore
--verbosity normal
--results-directory "$TEST_RESULTS_DIR"
--logger "trx;LogFileName=AtsJsonGenerator.Tests.trx"
-bl:"$TEST_RESULTS_DIR/AtsJsonGenerator.Tests.binlog"
- name: Upload test results
id: upload-test-results
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: logs-ToolsGenerator-ubuntu-latest
path: |
testresults/**/*.trx
testresults/**/*.binlog
- name: Generate test results summary
if: always()
shell: pwsh
run: |
& "${{ github.workspace }}/tests/scripts/Write-TestSummary.ps1" `
-TestResultsFolder $env:TEST_RESULTS_DIR `
-SummaryOutputPath $env:GITHUB_STEP_SUMMARY `
-ArtifactUrl "${{ steps.upload-test-results.outputs.artifact-url }}" `
-SummaryTitle "Tools Generator Tests"