Skip to content

C# Compiler

C# Compiler #7

Workflow file for this run

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