Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate from sea-orm to sqlx #87

Merged
merged 11 commits into from
May 21, 2024
Merged
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgres://bors:bors@localhost:5432/bors
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/test
Kobzol marked this conversation as resolved.
Show resolved Hide resolved
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand All @@ -24,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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading