Feature/assets #23
Workflow file for this run
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: Lint and Type Check | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
lint_and_type_check: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Python | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
# Install dependencies using uv | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install uv | |
# Sync the virtual environment and install project dependencies | |
- name: Sync virtual environment | |
run: uv sync | |
# Run ruff for linting | |
- name: Run ruff | |
run: uv run ruff check . | |
# Run mypy for type checking | |
- name: Run mypy | |
run: uv run mypy --strict . |