Skip to content

Commit f3fcb38

Browse files
committed
ci: fix build — migrazioni dirette + sqlx prepare fresh invece di cache stale
1 parent be8d302 commit f3fcb38

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,18 @@ jobs:
7676
run: |
7777
echo "DATABASE_URL=${DATABASE_URL}" >> $GITHUB_ENV
7878
79-
- name: Regenerate SQLx cache (if needed)
79+
- name: Run DB migrations
80+
working-directory: vulnerability-manager
81+
run: |
82+
. $HOME/.cargo/env
83+
sqlx database create || true
84+
sqlx migrate run
85+
86+
- name: Regenerate SQLx cache
87+
working-directory: vulnerability-manager
8088
run: |
81-
chmod +x scripts/deployment/regenerate-sqlx-cache.sh || true
82-
scripts/deployment/regenerate-sqlx-cache.sh || echo "Regenerate script exited non-zero (ok to continue if cache already present)"
89+
. $HOME/.cargo/env
90+
cargo sqlx prepare -- --lib
8391
8492
- name: Build backend (release)
8593
working-directory: vulnerability-manager

0 commit comments

Comments
 (0)