Skip to content

Commit

Permalink
Fix sqlx_todo CI checks (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
danitrod authored Mar 3, 2021
1 parent 75c19eb commit 7487a81
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 26 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/clippy-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ jobs:
toolchain: stable
components: clippy
override: true

- name: create test db for sqlx
run: |
sudo apt-get update && sudo apt-get install sqlite3
cd database_interactions/sqlx_todo
cp .env.example .env
cat schema.sql | sqlite3 test.db
chmod a+rwx test.db
- name: clippy
uses: actions-rs/clippy-check@v1
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ jobs:
toolchain: ${{ matrix.version }}
override: true

- name: create test db for sqlx
run: |
sudo apt-get update && sudo apt-get install sqlite3
cd database_interactions/sqlx_todo
cp .env.example .env
cat schema.sql | sqlite3 test.db
chmod a+rwx test.db
- name: cargo check
uses: actions-rs/cargo@v1
timeout-minutes: 30
Expand Down
222 changes: 220 additions & 2 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ members = [
"database_interactions/r2d2",
"database_interactions/redis",
"database_interactions/simple-auth-server",
"database_interactions/sqlx_todo",
"forms/form",
"forms/multipart",
"forms/multipart-async-std",
Expand Down
2 changes: 1 addition & 1 deletion database_interactions/sqlx_todo/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HOST=127.0.0.1
PORT=5000
DATABASE_URL="postgres://user:pass@192.168.33.11/actix_sqlx_todo"
DATABASE_URL=sqlite://database_interactions/sqlx_todo/test.db
RUST_LOG=sqlx_todo=info,actix=info
1 change: 1 addition & 0 deletions database_interactions/sqlx_todo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
.env
test.db
2 changes: 1 addition & 1 deletion database_interactions/sqlx_todo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ actix-web = "3"
listenfd = "0.3.3"
serde = "1.0.106"
serde_json = "1.0.51"
sqlx = { version = "0.3", features = [ "postgres" ] }
sqlx = { version = "0.3", features = [ "sqlite" ] }
dotenv = "0.15.0"
env_logger = "0.7.1"
log = "0.4.8"
Expand Down
Loading

0 comments on commit 7487a81

Please sign in to comment.