Skip to content

Commit

Permalink
Merge pull request #87 from vohoanglong0107/sqlx
Browse files Browse the repository at this point in the history
refactor: migrate from sea-orm to sqlx
  • Loading branch information
Kobzol authored May 21, 2024
2 parents 73970be + bad28fc commit 8b7b835
Show file tree
Hide file tree
Showing 56 changed files with 1,309 additions and 1,609 deletions.
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
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

0 comments on commit 8b7b835

Please sign in to comment.