Skip to content

Commit

Permalink
Merge branch 'feature/asdictionary'
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszlenar committed May 23, 2024
2 parents 4403f5e + 9e77869 commit 81944bf
Show file tree
Hide file tree
Showing 31 changed files with 3,345 additions and 247 deletions.
4 changes: 1 addition & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,7 @@ Before publishing, each release is tested on the ["latest" version](https://help

using the upcoming, the current and all also the supported [LTS versions](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) of the underlying frameworks:

* .NET 7.0 (RC1)
* .NET 6.0
* .NET Core 3.1
* .NET 8.0
* .NET Framework 4.8 (Windows only)

### Performance
Expand Down
275 changes: 136 additions & 139 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,30 @@ name: CI
on:
push:
branches-ignore:
- 'wip/**'
- "wip/**"
pull_request:
branches-ignore:
- 'wip/**'
- "wip/**"
release:
types: [published]
types: [published]

jobs:
tests:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
dotnet: ['3.1.x', '6.0.x', '7.0.100-rc.1.22431.12']
dotnet: ["6.0.x", "8.0.x"]
runs-on: ${{ matrix.os }}
name: Test on ${{ matrix.os }} using dotnet ${{ matrix.dotnet }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Setup target dotnet sdk
if: matrix.dotnet != '6.0.x'
uses: actions/setup-dotnet@v1
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: |
8.0.x
${{ matrix.dotnet }}
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Compile
Expand All @@ -45,17 +42,17 @@ jobs:
tests_netframework:
strategy:
matrix:
os: [ windows-latest ]
dotnet: [ net48 ]
os: [windows-2019]
dotnet: [net48]
runs-on: ${{ matrix.os }}
name: Test on ${{ matrix.os }} using dotnet ${{ matrix.dotnet }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: 8.0.x
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Compile
Expand All @@ -69,127 +66,127 @@ jobs:
name: Validot.${{ env.VALIDOT_VERSION }}.${{ matrix.dotnet }}.${{ matrix.os }}.testresults
path: artifacts/tests/Validot.${{ env.VALIDOT_VERSION }}.testresults
code_coverage:
needs: [ tests, tests_netframework ]
if: github.event_name == 'release' || github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Code coverage
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Setup dotnet sdk for global tool
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Analyze code coverage
run: pwsh build.ps1 --target codecoveragereport --dotnet 6.0.x --configuration debug --version ${{ env.VALIDOT_VERSION }}
- name: Upload artifact; code coverage data
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
path: artifacts/coverage/Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
- name: Upload artifact; code coverage summary
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
path: artifacts/coverage_reports/Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
- name: Upload artifact; code coverage report
if: github.event_name == 'release'
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_report
path: artifacts/coverage_reports/Validot.${{ env.VALIDOT_VERSION }}.coverage_report
- name: Publish code coverage
if: github.event_name != 'pull_request'
run: pwsh build.ps1 --target publishcodecoverage --skip --dotnet 6.0.x --configuration debug --version ${{ env.VALIDOT_VERSION }} --commitsha ${{ github.sha }} --codecovapikey ${{ secrets.CODECOV_API_KEY }} --required
needs: [tests, tests_netframework]
if: github.event_name == 'release' || github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Code coverage
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
6.0.x
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Analyze code coverage
run: pwsh build.ps1 --target codecoveragereport --dotnet 6.0.x --configuration debug --version ${{ env.VALIDOT_VERSION }}
- name: Upload artifact; code coverage data
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
path: artifacts/coverage/Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
- name: Upload artifact; code coverage summary
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
path: artifacts/coverage_reports/Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
- name: Upload artifact; code coverage report
if: github.event_name == 'release'
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_report
path: artifacts/coverage_reports/Validot.${{ env.VALIDOT_VERSION }}.coverage_report
- name: Publish code coverage
if: github.event_name != 'pull_request'
run: pwsh build.ps1 --target publishcodecoverage --skip --dotnet 8.0.x --configuration debug --version ${{ env.VALIDOT_VERSION }} --commitsha ${{ github.sha }} --codecovapikey ${{ secrets.CODECOV_API_KEY }} --required
nuget_package:
needs: [ tests, tests_netframework ]
if: github.event_name == 'release'
runs-on: ubuntu-latest
name: NuGet package
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Create package
run: pwsh build.ps1 --target nugetpackage --dotnet 6.0.x --configuration release --commitsha ${{ github.sha }} --version ${{ env.VALIDOT_VERSION }}
- name: Upload artifact; nuget package
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.nupkg
path: artifacts/nuget/${{ env.VALIDOT_VERSION }}/Validot.${{ env.VALIDOT_VERSION }}.nupkg
- name: Upload artifact; nuget package symbols
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.snupkg
path: artifacts/nuget/${{ env.VALIDOT_VERSION }}/Validot.${{ env.VALIDOT_VERSION }}.snupkg
- name: Publish nuget package
run: pwsh build.ps1 --target publishnugetpackage --skip --dotnet 6.0.x --configuration release --version ${{ env.VALIDOT_VERSION }} --commitsha ${{ github.sha }} --nugetapikey ${{ secrets.NUGET_API_KEY }}
needs: [tests, tests_netframework]
if: github.event_name == 'release'
runs-on: ubuntu-latest
name: NuGet package
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Setup base dotnet sdk
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
6.0.x
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Create package
run: pwsh build.ps1 --target nugetpackage --dotnet 8.0.x --configuration release --commitsha ${{ github.sha }} --version ${{ env.VALIDOT_VERSION }}
- name: Upload artifact; nuget package
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.nupkg
path: artifacts/nuget/${{ env.VALIDOT_VERSION }}/Validot.${{ env.VALIDOT_VERSION }}.nupkg
- name: Upload artifact; nuget package symbols
uses: actions/upload-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.snupkg
path: artifacts/nuget/${{ env.VALIDOT_VERSION }}/Validot.${{ env.VALIDOT_VERSION }}.snupkg
- name: Publish nuget package
run: pwsh build.ps1 --target publishnugetpackage --skip --dotnet 8.0.x --configuration release --version ${{ env.VALIDOT_VERSION }} --commitsha ${{ github.sha }} --nugetapikey ${{ secrets.NUGET_API_KEY }}
release_assets:
needs: [ code_coverage, nuget_package ]
if: github.event_name == 'release'
runs-on: ubuntu-latest
name: Upload release assets
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Download artifact; nuget package
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.nupkg
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget
- name: Download artifact; nuget package symbols
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.snupkg
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget
- name: Download artifact; code coverage data
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage/data
- name: Download artifact; code coverage summary
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage
- name: Download artifact; code coverage report
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_report
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage/report
- name: Zip artifacts
run: |
cd artifacts
zip -rX Validot.${{ env.VALIDOT_VERSION }}.nuget.zip Validot.${{ env.VALIDOT_VERSION }}.nuget
zip -rX Validot.${{ env.VALIDOT_VERSION }}.coverage.zip Validot.${{ env.VALIDOT_VERSION }}.coverage
- name: Upload release asset; nuget package with symbols
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget.zip
asset_name: Validot.${{ env.VALIDOT_VERSION }}.nuget.zip
asset_content_type: application/zip
- name: Upload release asset; code coverage data and reports
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage.zip
asset_name: Validot.${{ env.VALIDOT_VERSION }}.coverage.zip
asset_content_type: application/zip
needs: [code_coverage, nuget_package]
if: github.event_name == 'release'
runs-on: ubuntu-latest
name: Upload release assets
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Init workflow variables
run: pwsh .github/workflows/Init-WorkflowVariables.ps1
- name: Download artifact; nuget package
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.nupkg
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget
- name: Download artifact; nuget package symbols
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.snupkg
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget
- name: Download artifact; code coverage data
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.opencover.xml
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage/data
- name: Download artifact; code coverage summary
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_summary.json
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage
- name: Download artifact; code coverage report
uses: actions/download-artifact@v1
with:
name: Validot.${{ env.VALIDOT_VERSION }}.coverage_report
path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage/report
- name: Zip artifacts
run: |
cd artifacts
zip -rX Validot.${{ env.VALIDOT_VERSION }}.nuget.zip Validot.${{ env.VALIDOT_VERSION }}.nuget
zip -rX Validot.${{ env.VALIDOT_VERSION }}.coverage.zip Validot.${{ env.VALIDOT_VERSION }}.coverage
- name: Upload release asset; nuget package with symbols
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.nuget.zip
asset_name: Validot.${{ env.VALIDOT_VERSION }}.nuget.zip
asset_content_type: application/zip
- name: Upload release asset; code coverage data and reports
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: artifacts/Validot.${{ env.VALIDOT_VERSION }}.coverage.zip
asset_name: Validot.${{ env.VALIDOT_VERSION }}.coverage.zip
asset_content_type: application/zip
1 change: 0 additions & 1 deletion .nuke

This file was deleted.

Loading

0 comments on commit 81944bf

Please sign in to comment.