Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

db-migration-test.yml 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: DB Migration Test
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. - plugins/beta
  7. paths:
  8. - api/migrations/**
  9. - .github/workflows/db-migration-test.yml
  10. concurrency:
  11. group: db-migration-test-${{ github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. db-migration-test:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Checkout code
  18. uses: actions/checkout@v4
  19. with:
  20. fetch-depth: 0
  21. persist-credentials: false
  22. - name: Setup UV and Python
  23. uses: astral-sh/setup-uv@v6
  24. with:
  25. enable-cache: true
  26. python-version: "3.12"
  27. cache-dependency-glob: api/uv.lock
  28. - name: Install dependencies
  29. run: uv sync --project api
  30. - name: Prepare middleware env
  31. run: |
  32. cd docker
  33. cp middleware.env.example middleware.env
  34. - name: Set up Middlewares
  35. uses: hoverkraft-tech/compose-action@v2.0.2
  36. with:
  37. compose-file: |
  38. docker/docker-compose.middleware.yaml
  39. services: |
  40. db
  41. redis
  42. - name: Prepare configs
  43. run: |
  44. cd api
  45. cp .env.example .env
  46. - name: Run DB Migration
  47. env:
  48. DEBUG: true
  49. run: uv run --directory api flask upgrade-db