-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add migrations compatibility workflow
- Loading branch information
1 parent
6a2c5ad
commit 15bc09e
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
.github/workflows/dotnet-migrations-ensure-compatibility.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Ensure Migrations Compatibility | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: [opened, synchronize, reopened] | ||
paths: | ||
- 'backend/**' | ||
- '.github/workflows/dotnet-migrations-ensure-compatibility.yaml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ensure-migrations-compatibility: | ||
name: Try to generate script and to add a new migrations | ||
runs-on: ubuntu-latest | ||
env: | ||
OidcLoginSettings__FetchClientIdAndSecretFromRootEnvFile: 'false' | ||
OidcLoginSettings__ClientId: 'dummyRequired' | ||
OidcLoginSettings__ClientSecret: 'dummyRequired' | ||
steps: | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
9.0.x | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dotnet ef # Version should be the same as Migrations docker file and project | ||
run: dotnet tool install --version 8.0.7 --global dotnet-ef | ||
|
||
- name: Check if migrations script can be generated | ||
run: | | ||
dotnet ef migrations script --project backend/src/Designer | ||
- name: Check if it's possible to add a new migration | ||
run: | | ||
dotnet ef migrations add Test --project backend/src/Designer |