Skip to content

fix: install multiple sdk versions and add dynamic version #191

fix: install multiple sdk versions and add dynamic version

fix: install multiple sdk versions and add dynamic version #191

Workflow file for this run

name: dotnet package
on:
push:
branches:
- main
pull_request:
concurrency: ci
jobs:
test:
permissions:
contents: read
actions: read
checks: write
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version:
- "6.x.x"
- "8.x.x"
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore --locked-mode ./Descope
- name: Build with dotnet
run: dotnet build --no-restore --configuration Release
- name: Test with dotnet
timeout-minutes: 5
env:
AppSettings__ProjectId: ${{ secrets.DOT_NET_PROJECT_ID }}
AppSettings__ManagementKey: ${{ secrets.DOT_NET_MANAGEMENT_KEY_ID }}
run: dotnet test --no-build --configuration Release --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" --blame --blame-hang --blame-hang-timeout 1min --diag "TestResults-${{ matrix.dotnet-version }}/vstest_diagnostics.log"
- name: Upload dotnet test results
if: always()
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}
- name: Post test results to GitHub
uses: dorny/test-reporter@v1
if: always()
with:
name: .NET ${{ matrix.dotnet-version }} Tests
path: TestResults/*.trx
reporter: dotnet-trx