🛠️ CI: Convert to Python project, replace pipenv with uv (#205)
* Refactor bot.py to have a main() function
* Create pip-installable setuptools package
* Switch from PEP 735 Dependency Groups to PEP 508 Extra Dependencies
Pip does not yet support this (PR merged, not released, general availability might take years)
* Move from explicit package declaration to src-layout
* Revert "Switch from PEP 735 Dependency Groups to PEP 508 Extra Dependencies"
This reverts commit 979ac19abc01ed05e72422fe...
#604
This file contains hidden or 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: EuroPython Discord Bot CI | |
| run-name: "🛠️ CI: ${{ github.event.head_commit.message }} (${{ github.sha }})" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: 🕵 Lint Python code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "0.6.14" | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install dev dependencies | |
| run: uv sync --dev | |
| - name: Run Black | |
| run: uv run --dev black --check . | |
| - name: Run Flake8 | |
| run: uv run --dev flake8 . | |
| - name: Run isort | |
| run: uv run --dev isort --check . | |
| test: | |
| name: 🛠️ Test Python code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "0.6.14" | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install dev dependencies | |
| run: uv sync --dev | |
| - name: Run pytest | |
| run: uv run --dev pytest . |