From 2929f35f5da68bf673f98cbb25525cc105eb53b9 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Mon, 24 Aug 2026 11:38:48 +0200 Subject: [PATCH] Add temporary Vendor Values item diagnostic --- .github/workflows/temp-vendor-debug.yml | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/temp-vendor-debug.yml diff --git a/.github/workflows/temp-vendor-debug.yml b/.github/workflows/temp-vendor-debug.yml new file mode 100644 index 0000000..533588c --- /dev/null +++ b/.github/workflows/temp-vendor-debug.yml @@ -0,0 +1,72 @@ +name: Temporary Vendor Values Item Diagnostic + +on: + push: + branches: [classicapi-enhanced] + paths: + - '.github/workflows/temp-vendor-debug.yml' + +permissions: + contents: write + +jobs: + diagnose: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - name: Checkout ShaguTweaks + uses: actions/checkout@v4 + with: + ref: classicapi-enhanced + + - name: Checkout Tortoise DB Viewer + uses: actions/checkout@v4 + with: + repository: Xian55/tortoise-db-viewer + path: .vendor-build/viewer + + - name: Checkout Turtle WoW SQL + uses: actions/checkout@v4 + with: + repository: Penqle/tortoise-wow + path: .vendor-build/server + sparse-checkout: | + sql/base + sql/database_updates + sparse-checkout-cone-mode: false + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install viewer dependencies + working-directory: .vendor-build/viewer + run: bun install + + - name: Build migrated Turtle SQLite + working-directory: .vendor-build/viewer + env: + SQL_DIR: ${{ github.workspace }}/.vendor-build/server/sql/base + run: bun scripts/build-db.mjs + + - name: Query item 34001 + shell: python + run: | + import sqlite3 + from pathlib import Path + db = Path('.vendor-build/viewer/public/data/tortoise.sqlite') + con = sqlite3.connect(db) + row = con.execute('SELECT entry, name, buy_price, sell_price, class, subclass, quality, stackable FROM items WHERE entry = 34001').fetchone() + con.close() + text = 'item 34001\n' + repr(row) + '\n' + Path('.vendor-debug-34001.txt').write_text(text, encoding='utf-8') + print(text) + + - name: Commit diagnostic + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add .vendor-debug-34001.txt + git commit -m "Debug Vendor Values item 34001" + git push origin HEAD:classicapi-enhanced