Skip to content

CI: make warnings fatal when running pytest. #145

CI: make warnings fatal when running pytest.

CI: make warnings fatal when running pytest. #145

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
main:
strategy:
matrix:
include:
- python: '3.7'
polib: 'polib==1.0'
os: ubuntu-20.04
- python: '3.8'
os: ubuntu-20.04
- python: '3.9'
pytest: pytest==3.0
os: ubuntu-20.04
- python: '3.10'
pytest: pytest
os: ubuntu-22.04
- python: '3.11'
os: ubuntu-22.04
pytest: pytest
- python: '3.12'
os: ubuntu-22.04
pytest: pytest
- python: '3.13'
os: ubuntu-24.04
pytest: pytest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: set up Python ${{matrix.python}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
- name: install deps
run: |
python3 -m pip install ${{matrix.polib || 'polib'}}
python3 -m pip install rply
- name: run tests
run: |
python3 -m pip install nose
tests/run-nose -v
if: ${{! matrix.pytest}}
- name: run tests
run: |
python3 -m pip install ${{matrix.pytest}}
python3 -Werror -m pytest -v
if: ${{matrix.pytest}}
- name: check docs
run: |
dpkg-parsechangelog -ldoc/changelog --all 2>&1 >/dev/null | { ! grep .; }
python3 -m pip install docutils
make -C doc/
private/check-rst
- 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: install
run: |
make install PREFIX=~/.local
- name: check whether the executable was installed correctly
run: |
cd /
i18nspector --version
i18nspector --help
- name: check whether the man page was installed correctly
env:
MANPATH: /home/runner/.local/share/man
MANWIDTH: 80
run: |
cd /
man 1 i18nspector | grep -A 10 -w I18NSPECTOR
- 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 gettext
run: |
sudo apt-get install gettext
- name: ensure data is up-to-date
run: |
private/update-blackbox-tests
private/update-charmaps
private/update-tag-coverage
git diff --exit-code
nose:
runs-on: ubuntu-20.04
steps:
- name: set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: pip install wheel
run: |
python3 -m pip install wheel
- name: build wheel
run: |
python3 -m pip wheel --no-binary ':all:' nose
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: nose
path: nose-*.whl
compression-level: 0
retention-days: 1
pylint:
strategy:
matrix:
include:
- 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-20.04
- python: '3.11'
os: ubuntu-22.04
- python: '3.12'
os: ubuntu-22.04
- python: '3.13'
os: ubuntu-24.04
runs-on: ${{matrix.os}}
needs: nose
steps:
- uses: actions/checkout@v4
- name: set up Python ${{matrix.python}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
- name: download nose
uses: actions/download-artifact@v4
with:
name: nose
- name: install deps
run: |
python3 -m pip install nose-*.whl
# 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
python3 -m pip install pytest
python3 -m pip install polib
python3 -m pip install rply
python3 -m pip install pytz # for private/update-timezones
python3 -m pip install python-afl
- name: run pylint
run: |
python3 -m pip install pylint
private/run-pylint
# vim:ts=2 sts=2 sw=2 et