Skip to content

Add venv instructions #13

Add venv instructions

Add venv instructions #13

Workflow file for this run

name: run-tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.8"
os:
- ubuntu-latest
- macos-latest
- windows-latest
include:
- py: "3.5"
os: ubuntu-20.04
- py: "3.5"
os: macos-12
env:
# Workaround for pypi rejecting older SSL versions from older py versions:
# https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi
PIP_TRUSTED_HOST: ${{ matrix.py == '3.5' && 'pypi.python.org pypi.org files.pythonhosted.org' || '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python ${{ matrix.py }} for test
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Install dependencies ($PIP_TRUSTED_HOST="${{ env.PIP_TRUSTED_HOST }}")
run: |
python -m pip install --upgrade pip --quiet
pip install pytest
- name: Run tests
run: |
pytest -v --doctest-modules