diff options
author | FxQnLr <[email protected]> | 2023-10-21 22:05:26 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-21 22:05:26 +0200 |
commit | d9d7b125e4fcaa3aedd7b57a69e6880e012ccf33 (patch) | |
tree | fba162e613bf62984a3a7fb867c6d3c5d593f101 | |
parent | e8a8b2d33eec5da6701b04181b14de755e8b8063 (diff) | |
parent | ed47f77439a74ff58cc05367bd7a9d9fec324d97 (diff) | |
download | webol-d9d7b125e4fcaa3aedd7b57a69e6880e012ccf33.tar webol-d9d7b125e4fcaa3aedd7b57a69e6880e012ccf33.tar.gz webol-d9d7b125e4fcaa3aedd7b57a69e6880e012ccf33.zip |
Merge pull request #5 from FxQnLr/fix-init-db
fixed move of init_db_pool
-rw-r--r-- | .github/workflows/pull_request.yml | 26 | ||||
-rw-r--r-- | .github/workflows/push.yml | 9 | ||||
-rw-r--r-- | src/db.rs | 4 |
3 files changed, 30 insertions, 9 deletions
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9a1d005..d7eaaf3 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml | |||
@@ -12,7 +12,7 @@ env: | |||
12 | CARGO_TERM_COLOR: always | 12 | CARGO_TERM_COLOR: always |
13 | 13 | ||
14 | jobs: | 14 | jobs: |
15 | test: | 15 | check: |
16 | runs-on: ubuntu-latest | 16 | runs-on: ubuntu-latest |
17 | steps: | 17 | steps: |
18 | - name: Run sccache-cache | 18 | - name: Run sccache-cache |
@@ -35,7 +35,27 @@ jobs: | |||
35 | with: | 35 | with: |
36 | command: clippy | 36 | command: clippy |
37 | 37 | ||
38 | - name: run test | 38 | check-release: |
39 | runs-on: ubuntu-latest | ||
40 | steps: | ||
41 | - name: Run sccache-cache | ||
42 | uses: mozilla-actions/[email protected] | ||
43 | |||
44 | - uses: actions/checkout@v4 | ||
45 | - uses: actions-rs/toolchain@v1 | ||
46 | with: | ||
47 | toolchain: stable | ||
48 | components: rustfmt, clippy | ||
49 | override: true | ||
50 | |||
51 | - name: run cargo check | ||
39 | uses: actions-rs/cargo@v1 | 52 | uses: actions-rs/cargo@v1 |
40 | with: | 53 | with: |
41 | command: test | 54 | command: check |
55 | args: --release | ||
56 | |||
57 | - name: run clippy | ||
58 | uses: actions-rs/cargo@v1 | ||
59 | with: | ||
60 | command: clippy | ||
61 | args: --release | ||
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index acffe51..93b6edb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml | |||
@@ -29,16 +29,13 @@ jobs: | |||
29 | uses: actions-rs/cargo@v1 | 29 | uses: actions-rs/cargo@v1 |
30 | with: | 30 | with: |
31 | command: check | 31 | command: check |
32 | 32 | args: --release | |
33 | |||
33 | - name: Run Clippy | 34 | - name: Run Clippy |
34 | uses: actions-rs/cargo@v1 | 35 | uses: actions-rs/cargo@v1 |
35 | with: | 36 | with: |
36 | command: clippy | 37 | command: clippy |
37 | 38 | args: --release | |
38 | - name: run test | ||
39 | uses: actions-rs/cargo@v1 | ||
40 | with: | ||
41 | command: test | ||
42 | 39 | ||
43 | build: | 40 | build: |
44 | runs-on: ubuntu-latest | 41 | runs-on: ubuntu-latest |
@@ -1,9 +1,13 @@ | |||
1 | #[cfg(debug_assertions)] | ||
1 | use std::env; | 2 | use std::env; |
2 | 3 | ||
3 | use serde::Serialize; | 4 | use serde::Serialize; |
4 | use sqlx::{PgPool, postgres::PgPoolOptions}; | 5 | use sqlx::{PgPool, postgres::PgPoolOptions}; |
5 | use tracing::{debug, info}; | 6 | use tracing::{debug, info}; |
6 | 7 | ||
8 | #[cfg(not(debug_assertions))] | ||
9 | use crate::config::SETTINGS; | ||
10 | |||
7 | #[derive(Serialize)] | 11 | #[derive(Serialize)] |
8 | pub struct Device { | 12 | pub struct Device { |
9 | pub id: String, | 13 | pub id: String, |