ci test updated #2
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system -e ".[dev]" | |
| - name: Run ruff (lint) | |
| run: | | |
| uv run ruff check src/ tests/ | |
| - name: Run ruff (format check) | |
| run: | | |
| uv run ruff format --check src/ tests/ | |
| - name: Run black (format check) | |
| run: | | |
| uv run black --check src/ tests/ | |
| - name: Run mypy (type check) | |
| run: | | |
| uv run mypy src/ | |
| continue-on-error: true | |
| - name: Run tests | |
| run: | | |
| uv run pytest tests/ -v --cov=testiq --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| demo: | |
| name: Test Demo Command | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install package | |
| run: | | |
| uv pip install --system -e . | |
| - name: Run demo | |
| run: | | |
| testiq demo |