Improve string repr of some internal objects to make debugging easier #183
This file contains 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Test and Lint | |
on: [push] | |
jobs: | |
Pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- run: poetry --version | |
- run: poetry install | |
- name: Test with pytest | |
run: | | |
poetry run coverage run -m pytest | |
- name: Log code coverage | |
run: | | |
poetry run coverage report | |
- name: Generate code coverage report | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
poetry run coverage xml | |
- name: Create code coverage comment | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: orgoro/coverage@v3 | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
Ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- run: poetry --version | |
- run: poetry install | |
- name: Lint with ruff | |
run: | | |
poetry run ruff check | |
Mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- run: poetry --version | |
- run: poetry install | |
- name: Lint with mypy | |
run: | | |
poetry run mypy |