Skip to content

Implement faith-based ailment system #340

Implement faith-based ailment system

Implement faith-based ailment system #340

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 3 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Lint
run: dotnet format --no-restore --verify-no-changes
- name: Static Analysis
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"UltraWorldAI" /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
dotnet build --no-restore
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- name: Build
run: dotnet build --no-restore
- name: Test with coverage
run: dotnet test tests/UltraWorldAI.Tests/UltraWorldAI.Tests.csproj --no-build --verbosity normal --collect:"XPlat Code Coverage"
env:
DOTNET_TEST_RUN_IN_PARALLEL: 'true'
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: TestResults/**/*coverage.cobertura.xml
- name: Pack
run: dotnet pack src/UltraWorldAI/UltraWorldAI.csproj --no-build -c Release -o ./artifacts
- name: Upload NuGet package
uses: actions/upload-artifact@v4
with:
name: NuGet
path: ./artifacts/*.nupkg