chore(deps): bump coverlet.collector from 6.0.2 to 6.0.3 #304
Workflow file for this run
This file contains hidden or 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: .NET CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: Build and test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --nologo --verbosity normal --collect:"XPlat Code Coverage" | |
- name: ReportGenerator | |
uses: danielpalme/[email protected] | |
with: | |
reports: '**/TestResults/**/coverage.cobertura.xml' | |
targetdir: 'coveragereport' | |
reporttypes: 'Cobertura;' | |
verbosity: 'Info' | |
tag: '${{ github.run_number }}_${{ github.run_id }}' | |
toolpath: 'reportgeneratortool' | |
- name: Upload coverage report artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CoverageReport | |
path: coveragereport | |
overwrite: true | |
- name: Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./coveragereport/Cobertura.xml | |
directory: ./coveragereport/ | |
flags: unittests | |
name: 'Degiro Bookkeeper coverage' | |
verbose: true | |
publish: | |
needs: build | |
strategy: | |
matrix: | |
config: | |
- {os: ubuntu-latest, rid: "linux-x64", id: "linux" } | |
- {os: windows-latest, rid: "win-x64", id: "win" } | |
- {os: macos-latest, rid: "osx-x64", id: "osx" } | |
name: Create draft release on ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Set version variable (Linux and MacOS) | |
if: matrix.config.id != 'win' | |
run: echo "VER=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set version variable (Windows) | |
if: matrix.config.id == 'win' | |
run: echo "VER=$(($env:GITHUB_REF -split '/')[-1] -replace ' ','')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Build release artifacts | |
run: | | |
dotnet publish src/Degiro.Cli/Degiro.Cli.fsproj -c Release -o dgbk-${{ env.VER }}-${{ matrix.config.id }} | |
dotnet publish src/Degiro.Cli/Degiro.Cli.fsproj -c Release -r ${{ matrix.config.rid }} --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true -o dgbk-${{ env.VER }}-${{ matrix.config.id }}-sc | |
- name: Zip artifacts (Linux and MacOS) | |
if: matrix.config.id != 'win' | |
run: | | |
zip -r dgbk-${{ env.VER }}-${{ matrix.config.id }}.zip dgbk-${{ env.VER }}-${{ matrix.config.id }} | |
zip -r dgbk-${{ env.VER }}-${{ matrix.config.id }}-sc.zip dgbk-${{ env.VER }}-${{ matrix.config.id }}-sc | |
- name: Zip artifacts (Windows) | |
if: matrix.config.id == 'win' | |
run: | | |
Compress-Archive -Path dgbk-${{ env.VER }}-${{ matrix.config.id }} -DestinationPath dgbk-${{ env.VER }}-${{ matrix.config.id }}.zip | |
Compress-Archive -Path dgbk-${{ env.VER }}-${{ matrix.config.id }}-sc -DestinationPath dgbk-${{ env.VER }}-${{ matrix.config.id }}-sc.zip | |
- name: Create draft release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: ./*.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |