Skip to content

Bump Roslynator.Analyzers from 4.12.0 to 4.12.2 #575

Bump Roslynator.Analyzers from 4.12.0 to 4.12.2

Bump Roslynator.Analyzers from 4.12.0 to 4.12.2 #575

Workflow file for this run

name: Run tests
on:
pull_request:
branches:
- master
paths:
- src/**
- .github/workflows/**
# Upload code coverage results when PRs are merged
push:
branches:
- master
paths:
- src/**
- .github/workflows/**
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Build solution [Release]
if: ${{ startsWith(matrix.os, 'ubuntu') }}
working-directory: src
run: dotnet build --no-restore -c Release
- name: Build solution [Debug]
working-directory: src
run: dotnet build --no-restore -c Debug
- name: Test solution [Debug] with code coverage
if: ${{ startsWith(matrix.os, 'ubuntu') }}
working-directory: src
run: >
dotnet test
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Test solution [Debug] without code coverage
if: ${{ startsWith(matrix.os, 'windows') }}
working-directory: src
run: dotnet test --no-restore --no-build
- name: Upload coverage to codecov
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: 'src/.coverage/**/coverage.opencover.xml'
buildcheck:
needs:
- test
runs-on: ubuntu-latest
if: always()
steps:
- name: Pass build check
if: ${{ needs.test.result == 'success' }}
run: exit 0
- name: Fail build check
if: ${{ needs.test.result != 'success' }}
run: exit 1