chore: migrate to rye #355
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: Deploy | |
on: | |
push: | |
branches: | |
- trunk | |
paths: | |
- ".github/workflows/deploy.yaml" | |
- "chunithm_net/**" | |
- "cogs/**" | |
- "database/**" | |
- "tests/**" | |
- "utils/**" | |
- "bot.py" | |
- "poetry.lock" | |
- "pyproject.toml" | |
- "web.py" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- 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 | |
- name: Run type checking | |
run: rye run basedpyright | |
- name: Run tests | |
run: rye run pytest -v --html=report.html --self-contained-html | |
- name: Upload test report | |
if: always() | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: test-report | |
path: report.html | |
if-no-files-found: error | |
# - name: Deploy bot | |
# uses: appleboy/ssh-action@334f9259f2f8eb3376d33fa4c684fff373f2c2a6 | |
# with: | |
# host: ${{ secrets.SSH_HOST }} | |
# username: chuninewbot | |
# key: ${{ secrets.SSH_KEY }} | |
# script: | | |
# cd /home/chuninewbot/chuninewbot | |
# git pull | |
# /home/chuninewbot/.local/bin/poetry install --without dev --all-extras | |
# /home/chuninewbot/.local/bin/poetry run alembic upgrade head | |
# systemctl --user restart chunibot |