Skip to content

perf: Add a zero-allocation version of the API (#11) #26

perf: Add a zero-allocation version of the API (#11)

perf: Add a zero-allocation version of the API (#11) #26

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
- develop
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
filter: tree:0
- name: Setup .NET SDK
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: '8.0.x'
- name: Display .NET information
run: dotnet --info
- name: Build solution
run: dotnet build --configuration Release
- name: Run unit tests
run: >
dotnet test
./test/Moniker.Tests
--configuration Release
--no-build
--no-restore
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--collect:"XPlat Code Coverage"
--
RunConfiguration.CollectSourceInformation=true
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Run approval tests
run: >
dotnet test
./test/Moniker.ApprovalTests
--configuration Release
--no-build
--no-restore
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--collect:"XPlat Code Coverage"
--
RunConfiguration.CollectSourceInformation=true
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Create NuGet packages
run: dotnet pack --configuration Release
- name: Publish NuGet packages to GitHub Packages
if: github.event_name == 'push'
run: |
dotnet nuget add source \
--username alexmg \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
https://nuget.pkg.github.com/alexmg/index.json
dotnet nuget push '**/*.nupkg' \
--source github \
--api-key ${{ secrets.GITHUB_TOKEN }}
- name: Publish NuGet packages to NuGet.org
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
dotnet nuget push '**/*.nupkg' \
--source 'https://api.nuget.org/v3/index.json' \
--api-key ${{ secrets.NUGET_API_KEY }}