Skip to content

feat: add format-and-build-and-test.yml action #1

feat: add format-and-build-and-test.yml action

feat: add format-and-build-and-test.yml action #1

name: Build, validate formatting and run tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
format-and-build-and-test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Restore tools
run: dotnet tool restore
- name: Validate formatting
run: dotnet csharpier --check .
- name: Build Solution
run: dotnet build
- name: Run tests
run: dotnet test