-
-
Notifications
You must be signed in to change notification settings - Fork 7
129 lines (128 loc) · 3.89 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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
- python-version: '3.13'
pytest: pytest
os: ubuntu-24.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>:
python3 -m 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