Skip to content

chore: skip test when python version is unsupported on platform #2772

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 8 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,34 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: Use Python ${{ matrix.python }}
id: setup-python
continue-on-error: true
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
env:
PYTHON_VERSION: ${{ matrix.python }} # Why do this?
- name: Install Dependencies
if: steps.setup-python.outcome == 'success'
run: |
npm install --no-progress
pip install flake8 pytest
- name: Set Windows environment
if: startsWith(matrix.os, 'windows')
if: startsWith(matrix.os, 'windows') && steps.setup-python.outcome == 'success'
run: |
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Lint Python
if: startsWith(matrix.os, 'ubuntu')
if: startsWith(matrix.os, 'ubuntu') && steps.setup-python.outcome == 'success'
run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
- name: Run Python tests
if: steps.setup-python.outcome == 'success'
run: python -m pytest
# - name: Run doctests with pytest
# run: python -m pytest --doctest-modules
- name: Environment Information
if: steps.setup-python.outcome == 'success'
run: npx envinfo
- name: Run Node tests
if: steps.setup-python.outcome == 'success'
run: npm test