Skip to content

chore: 🔧 update configuration for PSD1 refresh #237

chore: 🔧 update configuration for PSD1 refresh

chore: 🔧 update configuration for PSD1 refresh #237

Workflow file for this run

name: FileInspectorX CI
on:
pull_request:
branches: ['**']
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**/*.md'
- 'Docs/**'
- '**/*.rst'
- '**/*.adoc'
- '**/*.png'
- '**/*.jpg'
- '**/*.gif'
- '**/*.svg'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE*'
- '**/README.*'
push:
branches: ['main','master','release/**']
paths-ignore:
- '**/*.md'
- 'Docs/**'
- '**/*.rst'
- '**/*.adoc'
- '**/*.png'
- '**/*.jpg'
- '**/*.gif'
- '**/*.svg'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE*'
- '**/README.*'
workflow_dispatch:
jobs:
build-test:
name: Build/Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
- name: Restore
run: dotnet restore FileInspectorX.sln
- name: Build
run: dotnet build FileInspectorX.sln -c Release --no-restore
- name: Test (net8.0)
if: runner.os != 'Linux'
run: dotnet test FileInspectorX.Tests/FileInspectorX.Tests.csproj -c Release -f net8.0 --no-build --logger "trx;LogFileName=test-results-net8.trx" --results-directory ./TestResults/net8
- name: Test (net8.0) + Coverage
if: runner.os == 'Linux'
run: dotnet test FileInspectorX.Tests/FileInspectorX.Tests.csproj -c Release -f net8.0 --no-build --logger "trx;LogFileName=test-results-net8.trx" --collect:"XPlat Code Coverage" --results-directory ./TestResults/net8
- name: Test (net472)
if: runner.os == 'Windows'
run: dotnet test FileInspectorX.Tests/FileInspectorX.Tests.csproj -c Release -f net472 --no-build --logger "trx;LogFileName=test-results-net472.trx" --results-directory ./TestResults/net472
- name: Upload test results
if: always() && hashFiles('TestResults/**/*.trx') != ''
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
path: ./TestResults/**/*.trx
- name: Upload coverage artifact
if: always() && runner.os == 'Linux' && hashFiles('TestResults/**/coverage.cobertura.xml') != ''
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.os }}
path: ./TestResults/**/coverage.cobertura.xml
- name: Upload coverage to Codecov
if: runner.os == 'Linux' && env.CODECOV_TOKEN != '' && hashFiles('TestResults/**/coverage.cobertura.xml') != ''
uses: codecov/codecov-action@v6
with:
files: ./TestResults/**/coverage.cobertura.xml
token: ${{ env.CODECOV_TOKEN }}
disable_search: true
fail_ci_if_error: false
- name: Coverage upload skipped (missing CODECOV_TOKEN)
if: runner.os == 'Linux' && env.CODECOV_TOKEN == ''
run: echo "Skipping Codecov upload because CODECOV_TOKEN is not configured."