Skip to content

chore(deps): update actions/setup-dotnet action to v5.4.0 (#268) #623

chore(deps): update actions/setup-dotnet action to v5.4.0 (#268)

chore(deps): update actions/setup-dotnet action to v5.4.0 (#268) #623

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "renovate.json"
- ".github/ISSUE_TEMPLATE/**"
- ".github/workflows/release.yml"
pull_request:
paths-ignore:
- "**.md"
- "renovate.json"
- ".github/ISSUE_TEMPLATE/**"
- ".github/workflows/release.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-and-analysis:
name: Test & Analysis
runs-on: windows-latest
timeout-minutes: 30
permissions:
contents: read
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ANALYSIS: true
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
show-progress: false
- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
global-json-file: global.json
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore dependencies
run: dotnet restore
- name: Install SonarCloud scanner
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
shell: powershell
run: dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Begin SonarCloud analysis
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin `
/k:"visus:cuid.net" `
/o:"visus" `
/d:sonar.token="$env:SONAR_TOKEN" `
/d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.cs.vscoveragexml.reportsPaths="**/TestResults/**/*.xml" `
/d:sonar.cs.vstest.reportsPaths="**/TestResults/**/*.trx"
- name: Build
run: dotnet build -c Release --no-restore
- name: Run tests
shell: powershell
run: |
dotnet test -c Release --no-build --no-restore -- `
--coverage `
--coverage-output-format xml `
--report-trx
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results
path: "**/TestResults/*.trx"
retention-days: 1
- name: End SonarCloud analysis
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner end `
/d:sonar.token="$env:SONAR_TOKEN"
publish-test-results:
name: Publish Test Results
runs-on: ubuntu-latest
needs: test-and-analysis
if: always()
timeout-minutes: 10
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 1
show-progress: false
- name: Download test results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: test-results
path: test-results
- name: Publish test results
uses: dorny/test-reporter@df6247429542221bc30d46a036ee47af1102c451 # v2.7.0
with:
name: Test Results
path: test-results/**/*.trx
reporter: dotnet-trx
fail-on-error: false