Update copyright notices. #88
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-version: '3.7' | |
os: ubuntu-20.04 | |
- python-version: '3.8' | |
os: ubuntu-20.04 | |
- python-version: '3.9' | |
pytest: pytest-3.0.7 | |
os: ubuntu-20.04 | |
- python-version: '3.10' | |
pytest: pytest | |
os: ubuntu-22.04 | |
- python-version: '3.11' | |
pytest: pytest | |
os: ubuntu-22.04 | |
- python-version: '3.12' | |
pytest: pytest | |
os: ubuntu-22.04 | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up Python ${{matrix.python-version}} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: set up APT | |
run: | | |
printf 'Apt::Install-Recommends "false";\n' | sudo tee -a /etc/apt/apt.conf | |
sudo apt-get update | |
- name: APT install deps | |
run: | |
sudo apt-get install | |
aspell-en | |
libenchant[0-9]* | |
- name: set up distutils | |
run: | | |
if ! [ -d ${{env.pythonLocation}}/lib/python*/distutils/ ]; then | |
echo SETUPTOOLS_USE_DISTUTILS=local | tee -a $GITHUB_ENV; | |
fi | |
- name: set up pip | |
run: | | |
sed -i -e 's/ sys.exit(.*)/ raise/' ${{env.pythonLocation}}/lib/python*/site-packages/pip/_internal/utils/setuptools_build.py | |
python3 -m pip list | |
- name: pip install deps | |
run: | | |
python3 -m pip install pyenchant | |
python3 -m pip install regex | |
- name: dump version and dictionary info | |
run: | | |
./mwic --version | |
./mwic --debug-dict --lang en-US | |
./mwic --debug-dict --lang en-GB | |
- name: run tests | |
if: ${{! matrix.pytest}} | |
run: | | |
python3 -m pip install nose | |
tests/run-nose --verbose | |
- name: run tests | |
if: ${{matrix.pytest}} | |
run: | | |
pytest=${{matrix.pytest}} | |
python3 -m pip install ${pytest/-/==} | |
python3 -m pytest -v | |
- name: run pydiatra | |
run: | | |
python3 -m pip install pydiatra | |
python3 -m pydiatra -v . | |
- name: run pyflakes | |
run: | | |
python3 -m pip install pyflakes | |
python3 -m pyflakes . | |
- name: pip install nose (for pylint) | |
run: | | |
# work-around for <https://github.com/nose-devs/nose/issues/1115>: | |
pip install 'setuptools<58' | |
# work-around for <https://github.com/nose-devs/nose/issues/1099>: | |
python3 -m pip install --no-binary ':all:' nose | |
# work-around for <https://github.com/nose-devs/nose/issues/1116>: | |
sed -i -e 's/ from unittest import _TextTestResult$/ from unittest import TextTestResult as _TextTestResult/' ${{env.pythonLocation}}/lib/python*/site-packages/nose/result.py | |
- name: run pylint | |
run: | | |
python3 -m pip install pylint | |
private/run-pylint | |
- name: build docs | |
run: | | |
python3 -m pip install docutils | |
make -C doc | |
- name: install | |
run: | |
make install PREFIX=~/.local | |
- name: check whether the executable was installed correctly | |
run: | | |
cd / | |
mwic --version | |
mwic --help | |
- name: check whether the man page was installed correctly | |
env: | |
MANPATH: /home/runner/.local/share/man | |
MANWIDTH: 80 | |
run: | | |
cd / | |
man 1 mwic | grep -A 10 -w MWIC | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: check reST syntax | |
run: | | |
python3 -m pip install docutils pygments | |
private/check-rst | |
- name: check changelog syntax | |
run: | | |
dpkg-parsechangelog -ldoc/changelog --all 2>&1 >/dev/null | { ! grep .; } | |
- name: check SVG syntax | |
run: | | |
python -m pip install html5validator | |
html5validator --svg doc/*.svg | |
# vim:ts=2 sts=2 sw=2 et |