enable CI/CD #10
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| quality: | |
| name: Quality Checks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras --dev | |
| - name: Run Ruff Check | |
| run: uv run ruff check . | |
| - name: Run Ruff Format | |
| run: uv run ruff format --check . | |
| - name: Run MyPy | |
| run: uv run mypy . | |
| - name: Run Pyre | |
| # Pyre might not support all python versions or platforms perfectly in all setups, | |
| # but we include it as requested. | |
| # Note: pyre-check is often linux-only or specific. | |
| # We'll try running it via uv. | |
| run: uv run pyre --noninteractive check | |
| - name: Run Tests | |
| run: uv run pytest | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: elong0527/py-forestly |