Refactor GitHub Actions workflows; add new workflows for Poetry and uv

This commit is contained in:
2025-02-01 23:11:11 +01:00
parent 22b90fdcee
commit 8e8e081e94
5 changed files with 103 additions and 44 deletions

41
.github/workflows/uv.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: uv
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 6 * * *"
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
TIMEZONE: Europe/Stockholm
LOG_LEVEL: Info
SQLITE_LOCATION: /data/jobs.sqlite
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test-on-uv:
name: Install with uv and run tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- run: |
if [ -z "${{ env.BOT_TOKEN }}" ]; then
echo "BOT_TOKEN not set"
exit 1
fi
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv and set the python version to ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
version: "latest"
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest