Skip to content

chore(support/v2): release 2.7.6 #8494

chore(support/v2): release 2.7.6

chore(support/v2): release 2.7.6 #8494

Workflow file for this run

name: CI/CD Pipeline
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
permissions:
contents: read
code-quality: write
pull-requests: read
env:
ARTIFACTS_FOLDER: ${{ github.workspace }}/Artifacts
GITHUB_RUN_NUMBER: ${{ github.run_number }}
steps:
- name: Setup .NET 8
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Checkout repository
id: checkout_repo
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Build projects
id: build_projects
shell: pwsh
run: |
dotnet build Microsoft.OpenApi.slnx -c Release
- name: Run unit tests
id: run_unit_tests
shell: pwsh
run: |
dotnet test Microsoft.OpenApi.slnx -c Release --no-build -v n --collect:"XPlat Code Coverage"
- name: Install report generator
shell: pwsh
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Generate coverage report
shell: pwsh
run: |
reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura"
- name: Add coverage to job summary
shell: bash
run: |
cat ./reports/coverage/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report
if: github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
uses: actions/upload-code-coverage@v1
with:
file: ./reports/coverage/Cobertura.xml
language: CSharp
label: code-coverage/dotnet
- name: Upload coverage artifact
uses: actions/upload-artifact@v7
with:
name: coverage
path: reports/coverage
validate-trimming:
name: Validate Project for Trimming
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET 8
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Validate Trimming warnings
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net10.0
working-directory: ./test/Microsoft.OpenApi.Trimming.Tests
validate-performance:
name: Validate performance of the library
runs-on: ubuntu-latest
needs: [ci]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET 8
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Copy committed results
run: |
mkdir -p ./performanceResults
cp -r ./performance/benchmark/BenchmarkDotNet.Artifacts/results/* ./performanceResults
- name: Run performance tests
run: |
dotnet run -c Release
working-directory: ./performance/benchmark
- name: Publish benchmark results
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: benchmark-results
path: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results"
- name: Run comparison tool for empty models
run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p IdenticalMemoryUsage
shell: bash
env:
NEW_REPORT: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json"
OLD_REPORT: "${{ github.workspace }}/performanceResults/performance.EmptyModels-report.json"
- name: Run comparison tool for descriptions
run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p ZeroPointTwoPercentDifferenceMemoryUsage
shell: bash
env:
NEW_REPORT: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json"
OLD_REPORT: "${{ github.workspace }}/performanceResults/performance.Descriptions-report.json"