From 0c2833defd182a63fd37c7af1dc36c337a43cbb7 Mon Sep 17 00:00:00 2001 From: Luca Palmieri Date: Mon, 27 Sep 2021 18:10:57 +0200 Subject: [PATCH] Check prepared data is up-to-date. --- .github/workflows/general.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml index fcb209c..dbb4fed 100644 --- a/.github/workflows/general.yml +++ b/.github/workflows/general.yml @@ -29,7 +29,7 @@ jobs: ports: - 5432:5432 env: - SQLX_VERSION: 0.5.5 + SQLX_VERSION: 0.5.7 SQLX_FEATURES: postgres steps: - name: Checkout repository @@ -56,6 +56,7 @@ jobs: with: path: | ~/.cargo/bin/sqlx + ~/.cargo/bin/cargo-sqlx key: ${{ runner.os }}-sqlx-${{ env.SQLX_VERSION }}-${{ env.SQLX_FEATURES }} - name: Install sqlx-cli @@ -76,6 +77,10 @@ jobs: sudo apt-get install libpq-dev -y SKIP_DOCKER=true ./scripts/init_db.sh + - name: Check sqlx-data.json is up-to-date + run: | + cargo sqlx prepare --check -- --bin zero2prod + - name: Run cargo test uses: actions-rs/cargo@v1 with: @@ -109,7 +114,7 @@ jobs: ports: - 5432:5432 env: - SQLX_VERSION: 0.5.5 + SQLX_VERSION: 0.5.7 SQLX_FEATURES: postgres steps: - name: Checkout repository @@ -167,7 +172,7 @@ jobs: ports: - 5432:5432 env: - SQLX_VERSION: 0.5.5 + SQLX_VERSION: 0.5.7 SQLX_FEATURES: postgres steps: - name: Checkout repository