-
-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (46 loc) · 1.69 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [ "master", "dev" ]
paths: [ ".github/workflows/ci.yml", "Src/**", "Benchmarks/**", "Generators/**", "Resources/**", "Samples/**", "Tests/**", "Tools/**", "GBX.NET.sln" ]
pull_request:
branches: [ "master", "dev" ]
paths: [ ".github/workflows/ci.yml", "Src/**", "Src/**", "Benchmarks/**", "Generators/**", "Resources/**", "Samples/**", "Tests/**", "Tools/**", "GBX.NET.sln" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
6.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore /p:ContinuousIntegrationBuild=true
- name: Test
if: ${{ (matrix.os == 'ubuntu-latest') || (github.ref == 'refs/heads/master') }}
run: dotnet test -c Release --no-build --verbosity normal --no-build --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
if: ${{ (github.ref == 'refs/heads/master') && (matrix.os == 'ubuntu-latest') }}
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: text
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '10 30'