Dev #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: tests | |
| on: | |
| push: | |
| paths: | |
| - '**' | |
| pull_request: | |
| paths: | |
| - '**' | |
| jobs: | |
| lint: | |
| name: Lint (ruff + mypy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install dev dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Ruff (lint) | |
| run: ruff check parol6 | |
| - name: Ruff (format check) | |
| run: ruff format --check parol6 | |
| - name: MyPy | |
| run: mypy parol6 | |
| test: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.10', '3.11'] | |
| steps: | |
| - name: Checkout repository (with submodules) | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Upgrade pip and install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" pytest-timeout | |
| - name: Show environment | |
| run: | | |
| python -V | |
| pip list | |
| - name: Run tests (skip hardware) | |
| env: | |
| PYTHONUNBUFFERED: '1' | |
| PYTHONUTF8: '1' | |
| run: | | |
| pytest |