57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: DevDash CLI CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'src/api/**'
|
|
- 'src/config/**'
|
|
- 'src/git/**'
|
|
- 'src/models/**'
|
|
- 'src/ui/**'
|
|
- 'src/cli.py'
|
|
- 'src/main.py'
|
|
- 'tests/**'
|
|
- 'pyproject.toml'
|
|
- 'requirements.txt'
|
|
- '.gitea/workflows/devdash-ci.yml'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'src/api/**'
|
|
- 'src/config/**'
|
|
- 'src/git/**'
|
|
- 'src/models/**'
|
|
- 'src/ui/**'
|
|
- 'src/cli.py'
|
|
- 'src/main.py'
|
|
- 'tests/**'
|
|
- 'pyproject.toml'
|
|
- 'requirements.txt'
|
|
- '.gitea/workflows/devdash-ci.yml'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: python -m pytest tests/ -v --tb=short
|
|
|
|
- name: Run linting
|
|
run: |
|
|
pip install ruff mypy
|
|
ruff check src/api/ src/config/ src/git/ src/models/ src/ui/ src/cli.py src/main.py
|
|
python -m mypy src/api/ src/config/ src/git/ src/models/ src/ui/ src/cli.py src/main.py --ignore-missing-imports
|