refactor: smash together analyzers and code-fixes #412
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: build | |
on: | |
push: | |
branches: [ "main", "releases/*" ] | |
pull_request: | |
branches: [ "main", "releases/*" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: '21' | |
- name: setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: restore dependencies | |
run: dotnet restore | |
- name: restore tools | |
run: dotnet tool restore | |
- name: Begin SQ-Analysis | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: dotnet tool run dotnet-sonarscanner begin /k:"earloc_TypealizR" /o:"earloc" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | |
- name: build | |
run: dotnet build --no-restore | |
- name: test | |
run: dotnet test --no-build | |
- name: end SQ-Analysis | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: dotnet tool run dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | |
- name: publish coverage report to coveralls.io | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: src/TypealizR.Tests/coverage.info |