Skip to content

Commit f478456

Browse files
authored
fix: Added property solution (#374)
* fix: Added property solution * fix: Added missing `global.json` * fix: Use `global.json` as a configuration for `actions/setup-dotnet` * fix: Removed old stuff
1 parent 7e6a381 commit f478456

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

.github/workflows/build-dotnet-fast.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
with:
9292
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
9393
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
94+
global-json-file: ./global.json
9495

9596
- name: NuGet cache
9697
uses: actions/[email protected]
@@ -108,7 +109,7 @@ jobs:
108109

109110
- name: Test
110111
run: |
111-
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnetLogging || 'minimal' }} --no-build --no-restore /p:GeneratePackageOnBuild=false /p:Version=${{ needs.version.outputs.solution-version }}
112+
dotnet test --solution ${{ inputs.solution }} -c Release -v ${{ inputs.dotnetLogging || 'minimal' }} --no-build --no-restore /p:GeneratePackageOnBuild=false /p:Version=${{ needs.version.outputs.solution-version }}
112113
113114
dependabot:
114115
name: Dependabot Merge

.github/workflows/step-dotnet-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
with:
5050
dotnet-version: ${{ inputs.dotnet-version }}
5151
dotnet-quality: ${{ inputs.dotnet-quality }}
52+
global-json-file: ./global.json
5253

5354
- name: Restore dependencies
5455
run: dotnet restore ${{ inputs.solution }} -v ${{ inputs.dotnet-logging }}

.github/workflows/step-dotnet-format.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
with:
4444
dotnet-version: ${{ inputs.dotnet-version }}
4545
dotnet-quality: ${{ inputs.dotnet-quality }}
46+
global-json-file: ./global.json
4647

4748
- name: Install CSharpier
4849
run: |

.github/workflows/step-dotnet-tests.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
on:
22
workflow_call:
33
inputs:
4-
enableSonarQube:
5-
required: false
6-
type: boolean
7-
default: false
84
enableCleanUpDockerDocker:
95
required: false
106
type: boolean
@@ -46,14 +42,6 @@ on:
4642
secrets:
4743
CODECOV_TOKEN:
4844
required: false
49-
SONAR_ORGANIZATION:
50-
required: false
51-
SONAR_PROJECT:
52-
required: false
53-
SONAR_TOKEN:
54-
required: false
55-
FETCH_TOKEN:
56-
required: false
5745

5846
jobs:
5947
testing:
@@ -93,6 +81,7 @@ jobs:
9381
with:
9482
dotnet-version: ${{ inputs.dotnet-version }}
9583
dotnet-quality: ${{ inputs.dotnet-quality }}
84+
global-json-file: ./global.json
9685

9786
- name: Restore dependencies
9887
run: dotnet restore ${{ inputs.solution }} -v ${{ inputs.dotnet-logging }}
@@ -103,7 +92,7 @@ jobs:
10392
- name: Test
10493
id: test
10594
run: |
106-
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnet-logging || 'minimal' }} --no-build --no-restore --collect:"XPlat Code Coverage;Format=cobertura,opencover" /p:Version=${{ inputs.solution-version }} /p:GeneratePackageOnBuild=false -- --coverage --coverage-output-format cobertura
95+
dotnet test --solution ${{ inputs.solution }} -c Release -v ${{ inputs.dotnet-logging || 'minimal' }} --no-build --no-restore /p:Version=${{ inputs.solution-version }} /p:GeneratePackageOnBuild=false -- --coverage --coverage-output-format cobertura
10796
10897
- name: ReportGenerator
10998
uses: danielpalme/[email protected]
@@ -120,7 +109,7 @@ jobs:
120109
121110
- name: Update codecov
122111
uses: codecov/[email protected]
123-
if: ${{ env.codecov_token != '' && (success() || steps.test.conclusion == 'failure' || steps.sonar.conclusion == 'skipped' ) }}
112+
if: ${{ env.codecov_token != '' && (success() || steps.test.conclusion == 'failure') }}
124113
with:
125114
token: ${{ env.codecov_token }}
126115
fail_ci_if_error: true

.github/workflows/step-dotnet-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
with:
4343
dotnet-version: ${{ inputs.dotnet-version }}
4444
dotnet-quality: ${{ inputs.dotnet-quality }}
45+
global-json-file: ./global.json
4546

4647
- name: Install GitVersion
4748
uses: gittools/actions/gitversion/[email protected]

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test": {
3+
"runner": "Microsoft.Testing.Platform"
4+
}
5+
}

0 commit comments

Comments
 (0)