Skip to content

Add GitHub Action to run tests on PRs #8

Add GitHub Action to run tests on PRs

Add GitHub Action to run tests on PRs #8

Workflow file for this run

name: pr-validation
on: pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
dotnetVersion: ['3.1.x', '5.x', '6.x', '7.x', '8.x']
include:
- dotnetVersion: '3.1.x'
targetFramework: 'netcoreapp3.1'
- dotnetVersion: '5.x'
targetFramework: 'net5.0'
- dotnetVersion: '6.x'
targetFramework: 'net6.0'
- dotnetVersion: '7.x'
targetFramework: 'net7.0'
- dotnetVersion: '8.x'
targetFramework: 'net8.0'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnetVersion }}
- run: dotnet restore DacFx.sln
- run: dotnet build DacFx.sln -f ${{ matrix.targetFramework }}
- run: dotnet pack DacFx.sln -f ${{ matrix.targetFramework }}
- run: dotnet test DacFx.sln -f ${{ matrix.targetFramework }}