Skip to content

chore: 🔧 mention AHK trick #72

chore: 🔧 mention AHK trick

chore: 🔧 mention AHK trick #72

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: ['main']
pull_request:
branches: ['main']
env:
HUSKY: 0
jobs:
build:
runs-on: windows-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore dependencies
run: dotnet restore --locked-mode
- name: Check format
run: dotnet format --no-restore --verify-no-changes
- name: Build
run: dotnet build --no-restore
- name: Test
id: test
run: dotnet test --no-build --logger "trx;LogFileName=TestResults.trx" --collect "XPlat Code Coverage"
continue-on-error: true
- name: Find .trx
id: trx
run: |
$path = (ls -Recurse -Filter *.trx | select -First 1).FullName
"path=$path" >> $env:GITHUB_OUTPUT
- name: Find coverage*.xml
id: coverage
run: |
$path = (ls -Recurse -Filter coverage*.xml | select -First 1).FullName
"path=$path" >> $env:GITHUB_OUTPUT
- name: Test report
if: ${{ !cancelled() }}
uses: bibipkins/[email protected]
env:
TRX_PATH: ${{ steps.trx.outputs.path }}
COVERAGE_PATH: ${{ steps.coverage.outputs.path }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-title: Test results
results-path: ${{ env.TRX_PATH }}
coverage-type: cobertura
coverage-path: ${{ env.COVERAGE_PATH }}
coverage-threshold: 80
- name: Fail if any step has failed
if: ${{ failure() }}
run: exit 1