Skip to content

Add formatting and Warnings as Errors #108

Add formatting and Warnings as Errors

Add formatting and Warnings as Errors #108

Workflow file for this run

name: Build and test
on: [push, pull_request]
jobs:
build:
timeout-minutes: 15 # we have a locking issue, so cap the runs at ~15m to account for varying build times, etc
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Tool restore
run: dotnet tool restore
- name: Format Check
run: dotnet fantomas . --check || { if [ $? -eq 99 ]; then echo "The code was not formatted, run 'dotnet fantomas .' to format all code."; exit 1; fi; }
- name: Restore
run: dotnet restore
- name: Run Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --verbosity normal
- name: Pack
run: dotnet pack --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
path: src/**/bin/Debug/*.nupkg