Add lint step to pull request workflow

This commit is contained in:
Daniel Cronqvist 2024-08-21 23:37:09 +02:00
parent 399c52d8ff
commit 55b7b81dba
3 changed files with 250 additions and 20 deletions

25
.github/workflows/pull-request.yml vendored Normal file
View file

@ -0,0 +1,25 @@
on:
pull_request:
branches:
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/DotTiled.sln
- name: Build
run: dotnet build --no-restore src/DotTiled.sln
- name: Test
run: dotnet test --no-build --verbosity normal src/DotTiled.sln
- name: Lint
run: |
dotnet format style --verify-no-changes --verbosity diagnostic src/DotTiled.sln
dotnet format analyzers --verify-no-changes --verbosity diagnostic src/DotTiled.sln