Skip to content

Commit a0662a3

Browse files
committed
fix: add sqlx migrations
1 parent 705761b commit a0662a3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ jobs:
5555
${{ runner.os }}-cargo-${{ matrix.rust }}-
5656
${{ runner.os }}-cargo-
5757
58+
- name: Install cargo-binstall
59+
uses: cargo-bins/[email protected]
60+
61+
- name: Install sqlx-cli
62+
run: cargo binstall sqlx-cli --features postgres --locked --force
63+
64+
- name: Set up database
65+
run: sqlx database create
66+
67+
- name: Run migrations
68+
run: sqlx migrate run
69+
5870
- name: Run cargo test with all features
5971
run: cargo test --all-features --verbose -- --test-threads=1
6072

.github/workflows/coverage.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ jobs:
4747
target
4848
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
4949

50+
- name: Install cargo-binstall
51+
uses: cargo-bins/[email protected]
52+
53+
- name: Install sqlx-cli
54+
run: cargo binstall sqlx-cli --features postgres --locked --force
55+
56+
- name: Set up database
57+
run: sqlx database create
58+
59+
- name: Run migrations
60+
run: sqlx migrate run
61+
5062
- name: Generate code coverage
5163
run: cargo tarpaulin --all-features --verbose --workspace --timeout 120 --out xml --test-threads 1
5264

0 commit comments

Comments
 (0)