CI: run Python 2.7 tests in a container. #79
Workflow file for this run
This file contains 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: CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
main: | ||
strategy: | ||
matrix: | ||
include: | ||
- python: '2.7' | ||
os: ubuntu-20.04 | ||
cython: cython==0.24 | ||
- python: '2.7' | ||
os: ubuntu-20.04 | ||
- python: '3.5' | ||
os: ubuntu-20.04 | ||
cython: cython==0.24 | ||
- python: '3.6' | ||
os: ubuntu-20.04 | ||
- python: '3.7' | ||
os: ubuntu-20.04 | ||
- python: '3.8' | ||
os: ubuntu-20.04 | ||
- python: '3.9' | ||
os: ubuntu-20.04 | ||
- python: '3.10' | ||
os: ubuntu-22.04 | ||
- python: '3.11' | ||
os: ubuntu-22.04 | ||
- python: '3.12-dev' | ||
os: ubuntu-22.04 | ||
container: ${{ (startsWith(matrix.python, '2.') && "python:2.7-buster") || null }} | ||
Check failure on line 32 in .github/workflows/ci.yml
|
||
runs-on: ${{matrix.os}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up Python ${{matrix.python}} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{matrix.python}} | ||
if: ${{ ! startsWith(matrix.python, '2.')} }} | ||
- name: install setuptools (if distutils is missing) | ||
run: | | ||
if ! [ -d ${{env.pythonLocation}}/lib/python*/distutils/ ]; then | ||
python -m pip install setuptools | ||
fi | ||
- name: set up pip cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{matrix.os}}-python${{matrix.python}}-${{matrix.cython || 'cython'}} | ||
- name: build and install AFL | ||
run: | | ||
mkdir deps | ||
wget https://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz -O deps/afl.tar.gz | ||
tar -xvzf deps/afl.tar.gz -C deps/ | ||
make -C deps/afl-*/ install PREFIX=~/.local | ||
- name: install Cython | ||
run: | ||
python -m pip install --verbose ${{matrix.cython || 'cython'}} | ||
- name: setup.py build | ||
run: | ||
PYTHONWARNINGS=error::FutureWarning python setup.py build | ||
- name: setup.py install | ||
run: | ||
python setup.py install | ||
- name: run tests | ||
run: | | ||
python -m pip install pytest | ||
python -m pytest --verbose | ||
- name: run pycodestyle | ||
run: | | ||
pip install pycodestyle | ||
pycodestyle . | ||
continue-on-error: | ||
${{ endsWith(matrix.python, '-dev') }} | ||
# FIXME: ./afl.pyx:196:121: E501 line too long (172 > 120 characters) | ||
# https://github.com/PyCQA/pycodestyle/issues/1142 | ||
- name: run pydiatra | ||
run: | | ||
python -m pip install pydiatra | ||
python -m pydiatra -v . | ||
- name: run pyflakes | ||
run: | | ||
python -m pip install pyflakes | ||
python -m pyflakes . | ||
- name: run pylint | ||
run: | | ||
pip install pylint | ||
private/run-pylint | ||
continue-on-error: | ||
${{ endsWith(matrix.python, '-dev') }} | ||
# FIXME: tests/__init__.py:1: C: trailing-newlines [] Trailing newlines | ||
- name: check changelog syntax | ||
run: | ||
dpkg-parsechangelog -ldoc/changelog --all 2>&1 >/dev/null | { ! grep .; } | ||
- name: check reST syntax | ||
run: | | ||
pip install docutils pygments | ||
private/check-rst | ||
- name: run shellcheck | ||
run: | | ||
shellcheck py-afl-* | ||
# vim:ts=2 sts=2 sw=2 et |