Skip to content

Commit

Permalink
💚(prefect) fix database dump fetching in the CI
Browse files Browse the repository at this point in the history
We need to fetch and checkout git-lfs managed files, not just using the
pointer.
  • Loading branch information
jmaupetit committed Feb 6, 2025
1 parent dcf2970 commit 7972b14
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/prefect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
QUALICHARGE_DATABASE_URL_NO_DRIVER: "postgresql://qualicharge:pass@localhost:5432/qualicharge-api"
steps:
- uses: actions/checkout@v4
- name: Fetch & checkout LFS-managed files
run: git lfs pull
- name: Restore database dump
run: |
pg_restore -s -F c -d "${QUALICHARGE_DATABASE_URL_NO_DRIVER}" ../../data/qualicharge-api-schema.sql
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ sur votre poste de travail :

## Démarrage rapide pour les développeurs

Vous devez tout d'abord récupérer les sources du projet :

```sh
# Cloner le projet avec SSH
git clone [email protected]:MTES-MCT/qualicharge.git

# Aller dans le repository local du projet
cd qualicharge

# Récupérer les fichiers gérés par Git-LFS
git lfs pull
```

Une fois le projet cloné, vous pouvez l'initialiser en utilisant la commande
suivante :

Expand Down
5 changes: 5 additions & 0 deletions src/prefect/tests/infrastructure/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ def test_task_get_targets_for_level_unexpected_level(db_connection):
"""Test the `get_targets_for_level` task (unexpected level)."""
with pytest.raises(NotImplementedError, match="Unsupported level"):
i1.get_targets_for_level.fn(db_connection, Level.NATIONAL)


def test_fake_test_to_run_the_ci():
"""Hey i'm fake. Better remove me."""
# FIXME

0 comments on commit 7972b14

Please sign in to comment.