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

Fix sqlx_todo CI checks #415

Merged
merged 6 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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