beerpiss -> beer-psi #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/**" | |
- "poetry.lock" | |
- "pyproject.toml" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 | |
with: | |
python-version: "3.11" | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install --without dev --all-extras | |
- name: Configuration | |
run: | | |
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: poetry run python -m dbutils create | |
- name: Update database with information from Chunirec + Zetaraku + Official website | |
run: poetry run python -m dbutils update chunirec | |
- name: Update sdvx.in chart views | |
run: poetry run python -m dbutils update sdvxin | |
- name: Update database aliases | |
run: poetry run python -m dbutils update alias | |
- name: Upload created database | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: database | |
path: database/database.sqlite3 |