Database Setup Rewrite #375
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: backend-test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
HUSKY: 0 | |
jobs: | |
backend-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Setup dotnet 7 | |
uses: actions/setup-dotnet@v1 | |
- name: Restore NuGet packages | |
run: dotnet restore | |
- name: Restore tools | |
run: dotnet tool restore | |
- name: Lint | |
run: dotnet format --verify-no-changes --no-restore . | |
- name: Backup committed openapi.json | |
run: cp LeaderboardBackend/openapi.json /tmp/committed-openapi.json | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Verify that committed openapi.json is up-to-date | |
run: | | |
diff --brief LeaderboardBackend/openapi.json /tmp/committed-openapi.json \ | |
|| (echo "LeaderboardBackend/openapi.json is outdated. Please build the project and commit the auto-generated file."; exit 1) | |
- name: Run tests | |
run: dotnet test LeaderboardBackend.Test --no-restore |