Skip to content

Commit

Permalink
Update gitversion usage and optimize dotnet test command.
Browse files Browse the repository at this point in the history
- Refactored gitversion steps to remove unnecessary conditional checks.
- Modified dotnet test command to skip build step for efficiency.
  • Loading branch information
winromulus committed Jun 15, 2024
1 parent aeecdea commit 3c3edc4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ jobs:
dotnet-version: '8.x'

- name: tools - gitversion - install
if: ${{ inputs.useVersioning == 'true' }}
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
preferLatestVersion: true

- name: tools - gitversion - execute
if: ${{ inputs.useVersioning == 'true' }}
uses: gittools/actions/gitversion/[email protected]
# with:
# useConfigFile: true
Expand All @@ -69,13 +67,12 @@ jobs:
run: dotnet restore

- name: dotnet build
if: ${{ inputs.useVersioning == 'true' }}
shell: bash
run: dotnet build --no-restore --configuration Release /p:Version=${{env.GitVersion_SemVer}} /p:AssemblyVersion=${{env.GitVersion_AssemblySemFileVer}} /p:NuGetVersion=${{env.GitVersion_SemVer}}

- name: dotnet test
shell: bash
run: dotnet test --verbosity normal
run: dotnet test --no-build --configuration Release --verbosity normal

- name: test-reporter
uses: dorny/test-reporter@v1
Expand Down

0 comments on commit 3c3edc4

Please sign in to comment.