35 lines
666 B
YAML
35 lines
666 B
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
|
|
- name: Run Ruff linting
|
|
run: ruff check src tests
|
|
|
|
- name: Run MyPy type checking
|
|
run: mypy src
|
|
|
|
- name: Run pytest
|
|
run: pytest tests/ -v --tb=short
|