satisfy codefactor #19
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: test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
cover: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: cover | |
run: | | |
cd src/js | |
npm install | |
bash scripts/build.sh | |
cd ../cs | |
dotnet workload restore | |
mkdir .nuget | |
dotnet build Bootsharp.Generate -c Release | |
dotnet build Bootsharp.Common -c Release | |
dotnet pack Bootsharp.Common -o .nuget | |
dotnet build -c Release | |
dotnet pack Bootsharp -o .nuget | |
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:ExcludeByAttribute=GeneratedCodeAttribute | |
cd ../js/test/cs | |
dotnet workload restore | |
dotnet publish -p:BootsharpName=embedded -p:BootsharpEmbedBinaries=true | |
dotnet publish -p:BootsharpName=sideload -p:BootsharpEmbedBinaries=false | |
cd ../.. | |
npm run cover | |
- name: upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |