Skip to content

Workflow file for this run

name: GitHub action build
on: push
jobs:
Main-build_windows:
runs-on: windows-latest
steps:
- name: GIT checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test net8.0
run: dotnet test --configuration Release --no-build --verbosity normal --framework net8.0 --collect:"XPlat Code Coverage;Format=lcov"
- name: Copy test coverage file
run: Get-Childitem –Path ".\tests\Fastenshtein.Tests\TestResults\" -Include "coverage.info" -File -Recurse | Move-Item -Destination "coverage.net8.info"
- name: Test net48
run: dotnet test --configuration Release --no-build --verbosity normal --framework net48 --collect:"XPlat Code Coverage;Format=lcov"
- name: Copy test coverage file
run: Get-Childitem –Path ".\tests\Fastenshtein.Tests\TestResults\" -Include "coverage.info" -File -Recurse | Move-Item -Destination coverage.net48.info
- name: Upload test coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
format: lcov
files: coverage.net8.info coverage.net48.info
- name: Pack
run: dotnet pack --configuration Release --no-build --nologo
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Fastenshtein.nupkg
path: src\Fastenshtein\bin\Release\Fastenshtein.*.nupkg
- name: Run benchmark
run: .\benchmarks\Fastenshtein.Benchmarking\bin\Release\net8.0\Fastenshtein.Benchmarking.exe
- name: Upload benchmarks-results to Artifacts
uses: actions/upload-artifact@v4
with:
name: benchmarks-results-windows-latest
path: BenchmarkDotNet.Artifacts
benchmarks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: GIT checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Run benchmarks script
run: |
cd scripts
./benchmark.sh
- name: Upload benchmarks-results to Artifacts
uses: actions/upload-artifact@v4
with:
name: benchmarks-results-${{ matrix.os }}
path: scripts/BenchmarkDotNet.Artifacts