Skip to content

chore(deps): update tests to v2.5.1 (#68) #83

chore(deps): update tests to v2.5.1 (#68)

chore(deps): update tests to v2.5.1 (#68) #83

Workflow file for this run

name: πŸ’Ώ CI
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
build:
name: 🏭 Build & Test
runs-on: ubuntu-22.04
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
- name: βš™ Restore
run: dotnet restore
- name: 🏭 Build
run: dotnet build --no-restore -c Release -p:ContinuousIntegrationBuild=true
- name: πŸ§ͺ Run tests
run: dotnet test --no-build -c Release
- name: ☒ Publish to Codecov
uses: codecov/codecov-action@v3
- name: πŸ—œ Pack Dev NuGet artifacts
if: github.ref == 'refs/heads/main'
run: dotnet pack --no-build -c Release --version-suffix dev-$(date +%s)-${GITHUB_SHA::7}
- name: πŸ—œ Pack NuGet artifacts
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack --no-build -c Release
- name: πŸ“€ Upload artifacts
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: nupkgs
path: src/**/*nupkg
github:
name: πŸš€ Deploy to GitHub
needs: [build]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
steps:
- name: πŸ“₯ Download artifacts
uses: actions/download-artifact@v3
with:
name: nupkgs
- name: πŸ“¦ Publish to GitHub
run: dotnet nuget push "**/*.nupkg" -s https://nuget.pkg.github.com/phnx47/index.json -k ${{ secrets.GH_PKG_PAT }} --skip-duplicate
nuget:
name: πŸš€ Deploy to NuGet
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
steps:
- name: πŸ“₯ Download artifacts
uses: actions/download-artifact@v3
with:
name: nupkgs
- name: πŸ“¦ Publish to NuGet
run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
benchmarks:
name: 🐌 Benchmarks
if: github.event_name != 'push'
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
- name: βš™ Restore
run: dotnet restore
- name: 🏭 Build
run: dotnet build --no-restore -c Release
- name: 🐌 Run all benchmarks
working-directory: tests/benchmarks
run: dotnet run -c Release -- -f *
- name: πŸ“ Add summary
working-directory: tests/benchmarks/BenchmarkDotNet.Artifacts/results
run: cat FingerprintBuilder.BenchmarkTests.ModelToHex-report-github.md >> $GITHUB_STEP_SUMMARY
- name: πŸ’¬ Add PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: tests/benchmarks/BenchmarkDotNet.Artifacts/results/FingerprintBuilder.BenchmarkTests.ModelToHex-report-github.md