chore: migrate from poetry to uv #1538
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: Run Linters | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
env: | |
AIRBYTE_ANALYTICS_ID: ${{ vars.AIRBYTE_ANALYTICS_ID }} | |
jobs: | |
ruff-lint-check: | |
name: Ruff Lint Check | |
runs-on: ubuntu-latest | |
steps: | |
# Common steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v1 | |
- name: Setup environment and install dependencies | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -e ".[dev]" | |
# Job-specifc step(s): | |
- name: Format code | |
run: | | |
source .venv/bin/activate | |
uv run ruff check . | |
ruff-format-check: | |
name: Ruff Format Check | |
runs-on: ubuntu-latest | |
steps: | |
# Common steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v1 | |
- name: Setup environment and install dependencies | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -e ".[dev]" | |
# Job-specifc step(s): | |
- name: Check code format | |
run: | | |
source .venv/bin/activate | |
uv run ruff format --check . | |
mypy-check: | |
name: MyPy Check | |
runs-on: ubuntu-latest | |
steps: | |
# Common steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v1 | |
- name: Setup environment and install dependencies | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -e ".[dev]" | |
# Job-specifc step(s): | |
- name: Check MyPy typing | |
run: | | |
source .venv/bin/activate | |
uv run mypy . |