Skip to content

Upgrade Stryker CLI tool to v3 #1848

Upgrade Stryker CLI tool to v3

Upgrade Stryker CLI tool to v3 #1848

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@v3
with:
fetch-depth: 0
- name: 🔧 Use .NET 6.0 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.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@v3
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@v3
- name: 🔧 Use .NET 6.0 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.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@v2
with:
verbose: true
- name: 📚 Artifact Test Results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: |
coverage/*.trx
- name: 📚 Artifact Test Coverage
uses: actions/upload-artifact@v3
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@v3
with:
fetch-depth: 0
- name: 🔖 Fetch test result artifact
uses: actions/download-artifact@v3
with:
name: test-results
path: results
- name: 🔖 Fetch test coverage artifact
uses: actions/download-artifact@v3
with:
name: test-coverage
path: coverage
- name: 🔧 Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: 11
- name: 🔧 Use .NET 6.0 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.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
extra_dictionaries: cspell:csharp/csharp.txt
cspell:companies/companies.txt
cspell:dotnet/dotnet.txt
cspell:filetypes/filetypes.txt
cspell:fullstack/fullstack.txt
cspell:html/html.txt
cspell:software-terms/softwareTerms.txt
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@v3
- name: ✅ Check YML
uses: ibiqlik/action-yamllint@v3