blob: 7a3af2133708d257875b3532070e19219bc354aa [file] [log] [blame] [edit]
name: test
on:
push:
pull_request:
schedule:
- cron: "34 4 */7 * *" # every week, time chosen by RNG
jobs:
test:
name: "test ${{ matrix.py }}"
continue-on-error: ${{ matrix.ignore-error }}
runs-on: ${{ matrix.os }}
# https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/5
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- { py: "3.7", ignore-error: false, os: ubuntu-22.04 }
- { py: "3.8", ignore-error: false, os: ubuntu-latest }
- { py: "3.9", ignore-error: false, os: ubuntu-latest }
- { py: "3.10", ignore-error: false, os: ubuntu-latest }
- { py: "3.11", ignore-error: false, os: ubuntu-latest }
- { py: "3.12", ignore-error: false, os: ubuntu-latest }
- { py: "3.13", ignore-error: false, os: ubuntu-latest }
- { py: "3.x", ignore-error: false, os: ubuntu-latest }
- { py: "pypy3.10", ignore-error: false, os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
- name: setup python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
cache: pip
cache-dependency-path: |
pyproject.toml
requirements*.txt
setup.py
- run: pip install -U pip
if: startsWith(matrix.py, 'pypy3')
- run: pip install 'codecov>=2.0.15' -r requirements-test.txt
- run: stages=venv,test script/test -sv
- run: codecov --flags=$(echo ${{ matrix.py }} |tr -d -- '-.')
test_py37_openssl11:
name: "TODO FIXME test py37-openssl11"
runs-on: ubuntu-latest
# https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/5
# FIXME Permission denied /usr/local/lib/python3.8/dist-packages/
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.fork }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: cache pip
uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-py37_openssl11-${{ hashFiles('.github/workflows/test.yaml', 'pyproject.toml', 'requirements.txt', 'requirements-test.txt', 'setup.py') }}
restore-keys: |
${{ runner.os }}-py37_openssl11-
${{ runner.os }}-
- name: build custom python
run: source script/compile-py3-openssl11.sh # source to alter PATH
- run: pip install 'codecov>=2.0.15' tox-gh -r requirements-test.txt
- run: script/test -sv
- run: codecov --flags=py37_openssl11