-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.44 KB
/
test.yaml
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
58
59
name: Tests
on:
push:
branches: [master]
paths: ["src/**", "tests/**", ".github/workflows/test.yaml"]
pull_request:
paths: ["src/**", "tests/**", ".github/workflows/test.yaml"]
jobs:
test-compiler:
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
cache: true
dotnet-version: 8.0.x
cache-dependency-path: "src/Compiler/packages.lock.json"
- name: Install dependencies
run: dotnet restore --locked-mode -r win-x64
- name: Test & Collect lcov coverage
run: dotnet test --logger trx /p:CollectCoverage=true /p:CoverletOutput=Coverage/ /p:CoverletOutputFormat=lcov
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: dotnet-coverage
path: ./tests/Compiler/coverage.info
test-scripts:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
shell: pwsh
run: |
Install-Module -Name Pester -Scope CurrentUser -Force
- name: Run Pester Tests
shell: pwsh
run: .\utils\Invoke-CodeCoverage.ps1