-
-
Notifications
You must be signed in to change notification settings - Fork 36
46 lines (44 loc) · 1.34 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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@v4
with:
dotnet-version: 8
- uses: actions/setup-node@v4
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@v4
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}