Skip to content

Update dawidd6/action-download-artifact action to v6 #2496

Update dawidd6/action-download-artifact action to v6

Update dawidd6/action-download-artifact action to v6 #2496

Workflow file for this run

name: "🔄 CI"
on:
push:
tags: ["v[1-9]+.[0-9]+.[0-9]"]
pull_request:
branches: ["main"]
types: ["opened", "synchronize", "reopened"]
jobs:
build:
name: 🔨 Build
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: 🔧 Use .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: 🔙 Get Previous Version
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
- name: 🔨 Build
run: >
dotnet build ./Tethos.sln
--configuration Release
-p:Version=$(echo ${{ steps.previoustag.outputs.tag }} | tr -d 'v')
- name: 🔦 Lint
run: dotnet format --verify-no-changes --no-restore
- name: 📚 Artifact NuGet
uses: actions/upload-artifact@v4
if: success()
with:
name: nuget-packages
path: |
src/**/Tethos*.nupkg
src/**/Tethos*.snupkg
test:
name: 🔬 Test
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: 🔧 Use .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: 🔬 Test
run: >
dotnet test ./Tethos.sln
--configuration Release
--filter FullyQualifiedName\!~Tethos.PerformanceTests
/p:CollectCoverage=true
/p:CoverletOutputFormat=opencover
--logger trx
--results-directory ./coverage
- name: 🔍 Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: 📚 Artifact Test Results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: |
coverage/*.trx
- name: 📚 Artifact Test Coverage
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-coverage
path: |
**/coverage.opencover.xml
sonar:
needs: test
name: 📡 SonarCloud
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: 📥 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: 🔖 Fetch test result artifact
uses: actions/download-artifact@v4
with:
name: test-results
path: results
- name: 🔖 Fetch test coverage artifact
uses: actions/download-artifact@v4
with:
name: test-coverage
path: coverage
- name: 🔧 Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17
- name: 🔧 Use .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: 🔦 Install SonarScanner
run: dotnet tool install dotnet-sonarscanner --version 5.* --global
- name: 🔽 Start SonarCloud scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
dotnet sonarscanner begin
/o:"${{ secrets.SONAR_ORGANIZATION }}"
/k:"${{ secrets.SONAR_PROJECT_KEY }}"
/d:sonar.login="${{ secrets.SONAR_TOKEN }}"
/d:sonar.host.url="${{ secrets.SONAR_URL }}"
/d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml"
/d:sonar.cs.vstest.reportsPaths="results/*.trx"
/d:sonar.coverage.exclusions="test/**, demo/**"
- name: 🔨 Build
run: >
dotnet build ./Tethos.sln
--configuration Release
- name: 🔼 End SonarCloud scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
dotnet sonarscanner end
/d:sonar.login="${{ secrets.SONAR_TOKEN }}"
spellcheck:
name: 🔦 Spellcheck
permissions:
contents: read
pull-requests: read
actions: read
outputs:
followup: ${{ steps.spelling.outputs.followup }}
runs-on: ubuntu-latest
steps:
- name: ✅ Check spelling
id: spelling
uses: check-spelling/[email protected]
with:
checkout: true
post_comment: 0
dictionary_source_prefixes: >
{
"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/",
"cspell_old": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"
}
extra_dictionaries: cspell:csharp/csharp.txt
cspell:dotnet/dotnet.txt
cspell:filetypes/filetypes.txt
cspell:fullstack/fullstack.txt
cspell:html/html.txt
cspell_old:companies/companies.txt
cspell_old:software-terms/softwareTerms.txt
check_extra_dictionaries: ""
spellcheck-comment:
name: 💬 Spellcheck
runs-on: ubuntu-latest
needs: spellcheck
permissions:
contents: write
pull-requests: write
if: (success() || failure()) && needs.spellcheck.outputs.followup
steps:
- name: 💬 Report
uses: check-spelling/[email protected]
with:
checkout: true
task: ${{ needs.spellcheck.outputs.followup }}
lint-yml:
name: 🐞 YML
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: ✅ Check YML
uses: ibiqlik/action-yamllint@v3