Skip to content

feat(ci): add main build, PR validation, and release workflows #1

feat(ci): add main build, PR validation, and release workflows

feat(ci): add main build, PR validation, and release workflows #1

Workflow file for this run

name: PR Validation
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
validate:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.0.x', '9.0.x', '10.0.x']
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for GitVersion
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.dotnet-version }}
path: '**/TestResults/**/*.trx'