Skip to content

Bump Verify.Xunit from 28.7.1 to 28.8.1 #31

Bump Verify.Xunit from 28.7.1 to 28.8.1

Bump Verify.Xunit from 28.7.1 to 28.8.1 #31

name: Static Analysis
on:
push:
branches:
- develop
paths:
- 'src/**'
- 'test/**'
- '**.sln'
- '.github/workflows/static-analysis.yml'
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'src/**'
- 'test/**'
- '**.sln'
- '.github/workflows/static-analysis.yml'
env:
PROJECT_NAME: 'baynezy_Html2Markdown'
ORGANISATION: 'baynezy'
TEST_FILTER: "Category!=LocalTest"
TestPath: /home/runner/work/Html2Markdown/Html2Markdown/test/Html2Markdown.Test/Files/
jobs:
build:
if: github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
name: Build and analyse
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # This disables shallow clones. This allows SonarQube to access the history of the project to perform analysis.
- name: Cache SonarQube Cloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarQube Cloud scanner
id: cache-sonar-scanner
uses: actions/cache@v4
with:
path: .sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarQube Cloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir -p .sonar/scanner
dotnet tool update dotnet-sonarscanner --tool-path .sonar/scanner
- name: Install dotCover
shell: bash
run: |
dotnet tool install --global JetBrains.dotCover.GlobalTool
- name: Build, run code coverage, and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
filter=""
if [ "${{ env.TEST_FILTER }}" != "" ]; then
filter="--filter ${{ env.TEST_FILTER }}"
fi
.sonar/scanner/dotnet-sonarscanner begin /k:"${{ env.PROJECT_NAME }}" /o:"${{ env.ORGANISATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html
dotnet build
dotnet dotcover test $filter --dcReportType=HTML
.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"