Skip to content

Commit 91e7d56

Browse files
committed
ci: add postgres/sqlx to clippy job
Signed-off-by: Alexis Asseman <[email protected]>
1 parent 746187b commit 91e7d56

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,22 @@ jobs:
2121
clippy:
2222
name: cargo clippy
2323
runs-on: ubuntu-latest
24+
services:
25+
postgres:
26+
image: postgres:15
27+
env:
28+
POSTGRES_HOST_AUTH_METHOD: trust
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
ports:
35+
- 5432:5432
2436
container:
2537
image: rust:latest
38+
env:
39+
DATABASE_URL: postgres://postgres@postgres:5432
2640
steps:
2741
- uses: actions/checkout@v3
2842
- uses: actions/cache@v3
@@ -34,6 +48,10 @@ jobs:
3448
~/.cargo/git/db/
3549
target/
3650
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
51+
- name: Install sqlx
52+
run: cargo install sqlx-cli --no-default-features --features postgres
53+
- name: Run the test sqlx migrations
54+
run: cargo sqlx migrate run
3755
- run: |
3856
rustup component add clippy
3957
# Temporarily allowing dead-code, while denying all other warnings

0 commit comments

Comments
 (0)