C# Compiler #15
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: 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 |