Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/actions/set-up-legacy-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ runs:
with:
default: "${{ inputs.python-version }}"
command: pip install -U pip

- name: Restore PATH on cache hit
if: steps.pyenv-cache.outputs.cache-hit == 'true'
shell: bash
run: |
PYENV_ROOT="/opt/hostedtoolcache/pyenv_root/2.4.20/x64"
PYTHON_BIN="$PYENV_ROOT/versions/${{ inputs.python-version }}/bin"
echo "$PYTHON_BIN" >> $GITHUB_PATH

- name: Verify Python version
shell: bash
run: |
echo "Active Python: $(python --version)"
python --version 2>&1 | grep -q "^Python ${{ inputs.python-version }}" || (echo "ERROR: Expected Python ${{ inputs.python-version }}" && exit 1)
- name: Install dependencies
run: |
python -m pip install flake8 pytest setuptools wheel
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,25 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Verify Python version
shell: bash
run: |
echo "Active Python: $(python --version)"
python --version 2>&1 | grep -q "^Python ${{ inputs.python-version }}" || (echo "ERROR: Expected Python ${{ inputs.python-version }}" && exit 1)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pyright pytest setuptools wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 . --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160
python -m flake8 . --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160
- name: Lint with pyright (type checking)
run: |
pyright cfbs --pythonversion ${{ matrix.python-version }}
python -m pyright cfbs --pythonversion ${{ matrix.python-version }}
- name: Test with pytest
run: |
pytest
python -m pytest
- name: Install
run: |
python setup.py sdist bdist_wheel
Expand Down
Loading