141-wheel-package-incomplete #195
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: | | |
uv sync --all-extras | |
uv pip install -e . | |
- name: Test with pytest | |
env: | |
MONGODB_PASSWORD: ${{secrets.MONGODB_PASSWORD}} | |
run: | | |
uv run pytest | |
lint-and-format-backend: | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "latest" | |
- name: Check Black formatting | |
uses: reviewdog/action-black@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-pr-review | |
filter_mode: added | |
level: warning | |
- uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
if: always() | |
- name: Check Ruff linting (Reviewdog) | |
if: always() | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
uv run --with ruff ruff check . \ | |
| reviewdog -name=Ruff -reporter=local -reporter=github-pr-review -efm="%f:%l:%c: %m" -filter-mode=added -fail-on-error=false | |
- name: Check Mypy linting | |
if: always() | |
uses: tsuyoshicho/action-mypy@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-pr-review | |
filter_mode: added | |
setup_command: uv sync --all-extras | |
setup_method: install | |
level: warning | |
mypy_flags: --python-version 3.10 |