[pre-commit.ci] pre-commit autoupdate #2238
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: ~ | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 | |
| with: | |
| python-version: 3.11 | |
| cache: "poetry" | |
| - name: Install dependencies | |
| shell: bash | |
| run: poetry install | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
| - name: Run poetry build | |
| shell: bash | |
| run: poetry build | |
| - name: Run poetry check | |
| shell: bash | |
| run: poetry check | |
| tests: | |
| name: pytest/${{ matrix.os }}/${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| matrix: | |
| os: [Ubuntu, MacOS, Windows] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| env: | |
| OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "poetry" | |
| - name: Get full Python version | |
| id: full-python-version | |
| shell: bash | |
| run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") | |
| - name: Install dependencies | |
| shell: bash | |
| run: poetry install | |
| - name: Run pytest | |
| shell: bash | |
| run: poetry run python -m pytest --cov=. --cov-report=xml | |
| - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |