This repository was archived by the owner on Sep 1, 2025. It is now read-only.
Merge pull request #57 from vippsas/dependabot/pip/python/zeroeventhu… #65
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: Run Python unit-tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - python/** | |
| - .github/workflows/python-test.yml | |
| pull_request: | |
| paths: | |
| - python/** | |
| - .github/workflows/python-test.yml | |
| defaults: | |
| run: | |
| working-directory: ./python/zeroeventhub | |
| jobs: | |
| build: | |
| name: Install Python and Poetry, then lint and run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| name: Install Python | |
| with: | |
| python-version: '3.13.0' | |
| - name: Install and configure Poetry | |
| run: | | |
| pip install poetry==1.8.4 | |
| poetry config virtualenvs.in-project true | |
| - run: poetry install --sync | |
| name: Install dependencies | |
| # lint | |
| - run: poetry run ruff format | |
| name: Run ruff format | |
| - run: poetry run ruff check | |
| name: Run ruff check | |
| - run: poetry run pyright | |
| name: Check types | |
| # test | |
| - run: poetry run coverage run --branch -m pytest | |
| name: Run unit tests | |
| - run: poetry run coverage report --fail-under 98 --omit='tests/**' | |
| name: Show code coverage |