From 551f7ca0772b78071cfaad7e4f75a5c8720a5f35 Mon Sep 17 00:00:00 2001 From: arkanoider Date: Sun, 15 Dec 2024 21:38:58 +0100 Subject: [PATCH] testing new db approach on CI --- .github/workflows/rust.yml | 12 ++++++- .gitignore | 1 + sqlx-data.json | 73 -------------------------------------- 3 files changed, 12 insertions(+), 74 deletions(-) delete mode 100644 sqlx-data.json diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2b5b573f..e0a67da9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,8 +19,18 @@ jobs: steps: - name: Install Protoc uses: arduino/setup-protoc@v3 - + - uses: actions/checkout@v3 + - name: Install sqlx + run: cargo install sqlx-cli --version 0.6.2 + - name: Init DB + run: sqlx database create + - name: Run migrations + run: sqlx migrate run + - name: Prepare offline file + run: cargo sqlx prepare + - name: Check offline file + run: cargo prepare --check - name: Run tests run: cargo test --verbose diff --git a/.gitignore b/.gitignore index 0bd33df7..16e9fb80 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .env mostro.db* mostro.log +sqlx-data.json # IDE's .idea diff --git a/sqlx-data.json b/sqlx-data.json deleted file mode 100644 index ab16f536..00000000 --- a/sqlx-data.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "db": "SQLite", - "0000b9b802fb5639a06762bf8c041dd0a942d54b503c801e2f1d1cb788789a44": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n master_seller_pubkey = ?1\n WHERE id = ?2\n " - }, - "77ea98f6af16fa6e5a7d604965593700c563f88d88cb10b348bdc4200c87ad1d": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n buyer_pubkey = ?1\n WHERE id = ?2\n " - }, - "97414183485e04346f420960beed77912ebe76089f58d30f0f526e232ce4be25": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 8 - } - }, - "query": "\n UPDATE orders\n SET\n status = ?1,\n amount = ?2,\n fee = ?3,\n hash = ?4,\n preimage = ?5,\n taken_at = ?6,\n invoice_held_at = ?7\n WHERE id = ?8\n " - }, - "b047209f67b1c1fad80c1d812c0ad0fa4116d16175fa2569962cd13c0ca05ac3": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n invoice_held_at = ?1\n WHERE id = ?2\n " - }, - "bc86a8ab2ce2b27ca5d1dde6b5622c7f00ee761fe5b475bda0e9145093fc2810": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n taken_at = ?1\n WHERE id = ?2\n " - }, - "c5bc1af1d462bfdbda706928ee4f8c6ea73fed4d84154f3f7975f96aa515ef3b": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n master_buyer_pubkey = ?1\n WHERE id = ?2\n " - }, - "da72f298a426b1c65f7c67bf44436ba0b0878e52694cbd4cbca8585afcc665df": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "\n UPDATE orders\n SET\n seller_pubkey = ?1\n WHERE id = ?2\n " - } -} \ No newline at end of file