Add a way to debug github CI #129
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| pull_request: | |
| workflow_call: | |
| inputs: | |
| debug_ssh_session: | |
| required: false | |
| type: boolean | |
| env: | |
| PYTEST_ADDOPTS: --color=yes | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.8' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install .[qa] .[testing] | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ inputs.debug_ssh_session }} | |
| with: | |
| limit-access-to-actor: true | |
| - name: Run Flake8 | |
| # Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong. | |
| run: flake8 --extend-ignore F401 parso test/*.py setup.py scripts/ | |
| - name: Run Zuban | |
| run: zuban check | |
| test: | |
| runs-on: ubuntu-latest | |
| continue-on-error: ${{ matrix.experimental }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
| experimental: [false] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install .[testing] | |
| - name: Run pytest | |
| run: pytest | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.8' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install .[testing] coverage coveralls | |
| - name: Run pytest with coverage | |
| run: | | |
| coverage run -m pytest | |
| coverage report | |
| - name: Upload coverage report to Coveralls | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: coveralls --service=github |