Skip to content

Commit

Permalink
add migrations compatibility workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkoSekulic committed Nov 14, 2024
1 parent 6a2c5ad commit 15bc09e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/dotnet-migrations-ensure-compatibility.yaml
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

0 comments on commit 15bc09e

Please sign in to comment.