Skip to content

fix: fixes

fix: fixes #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore MakerPrompt.Tests/MakerPrompt.Tests.csproj
- name: Build
run: dotnet build MakerPrompt.Tests/MakerPrompt.Tests.csproj --no-restore -c Release
- name: Test with coverage
run: |
dotnet test MakerPrompt.Tests/MakerPrompt.Tests.csproj \
--no-build \
--configuration Release \
--collect:"XPlat Code Coverage" \
--results-directory ./coverage \
--settings coverage.runsettings \
--logger "trx;LogFileName=test-results.trx"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage/**/coverage.cobertura.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ./coverage/**/coverage.cobertura.xml
if-no-files-found: warn
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./coverage/**/*.trx
if-no-files-found: warn