fix build pipeline #426
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, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.9, '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and set the Python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Check code style with black | |
| run: | | |
| uv run black --check . | |
| - name: Check types with mypy | |
| run: | | |
| uv run mypy . | |
| - name: Check imports with isort | |
| run: | | |
| uv run isort --check-only --profile black . | |
| - name: Lint with flake8 | |
| run: | | |
| uv run flake8 --ignore=E501,E704 solax tests | |
| - name: Lint with pylint | |
| run: | | |
| uv run pylint -d 'C0111' solax tests | |
| - name: Test with pytest | |
| run: | | |
| uv run pytest --cov=solax --cov-branch --cov-report=term-missing . | |
| mv .coverage .coverage.${{ matrix.python-version }} | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: .coverage-${{ matrix.python-version }} | |
| path: .coverage.${{ matrix.python-version }} | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and set the Python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.12 | |
| - name: Download coverage files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Coverage combine | |
| run: | | |
| uv run coverage combine | |
| uv run coverage report -m --fail-under=100 |