Skip to content

Commit

Permalink
ci: check for sqlx files
Browse files Browse the repository at this point in the history
  • Loading branch information
vohoanglong0107 committed May 21, 2024
1 parent d8f25a4 commit bad28fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
name: Test
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
DATABASE_URL: postgres://postgres:password@localhost:5432/test
services:
postgres:
Expand Down Expand Up @@ -41,8 +40,17 @@ jobs:
override: true
components: clippy, rustfmt

- name: Install sqlx-cli
run: cargo install sqlx-cli@0.7.4 --no-default-features --features native-tls,postgres

- uses: Swatinem/rust-cache@v1

- name: Run SQLx migrations
run: cargo sqlx database create && sqlx migrate run

- name: Check .sqlx files
run: cargo sqlx prepare --check -- --tests

- name: Check
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit bad28fc

Please sign in to comment.