Skip to content

fix(dbutils): rewrite to use msgspec #111

fix(dbutils): rewrite to use msgspec

fix(dbutils): rewrite to use msgspec #111

name: Test DB generation
on:
workflow_dispatch:
push:
branches:
- trunk
paths:
- ".github/workflows/test_creating_db.yaml"
- "utils/config.py" # Contains default value for DB path
- "database/**"
- "dbutils/**"
- "pyproject.toml"
- "requirements.lock"
- "requirements-dev.lock"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install rye
uses: eifinger/setup-rye@cba39b644640fb95c375ce5bfe2fdf33c0b815fc # v4
with:
version: "0.41.0"
enable-cache: true
cache-prefix: "rye-cache"
- name: Install dependencies
run: rye sync --all-features --no-dev
- name: Configuration
run: |
mkdir -p data/
cp bot.example.ini bot.ini
sed -i 's/# chunirec_token = <token>/chunirec_token = ${{ secrets.CHUNIREC_TOKEN }}/' bot.ini
- name: Create database from schema
run: rye run python -m dbutils create
- name: Update database with information from Chunirec + Zetaraku + Official website
run: rye run python -m dbutils update chunirec
- name: Update sdvx.in chart views
run: rye run python -m dbutils update sdvxin
- name: Update database aliases
run: rye run python -m dbutils update alias
- name: Update song jacket lookup
run: rye run python -m dbutils update jackets
- name: Upload created database
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: database
path: data/database.sqlite3