feat: Phase 1 - K2 Reference Data Platform with CI/CD #3
Workflow file for this run
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: Lint | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| lint: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache uv dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| .venv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv- | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install -e ".[dev]" | |
| - name: Run linting (ruff) | |
| run: | | |
| source .venv/bin/activate | |
| ruff check src/ tests/ | |
| - name: Check code formatting (black) | |
| run: | | |
| source .venv/bin/activate | |
| black --check src/ tests/ | |
| - name: Check import sorting (isort) | |
| run: | | |
| source .venv/bin/activate | |
| isort --check-only src/ tests/ | |
| - name: Run type checking (mypy) | |
| run: | | |
| source .venv/bin/activate | |
| mypy src/refdata |