testing new build #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
path: src\Fastenshtein\bin\Release\Fastenshtein.*.*upkg | |
- 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 |