Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ci for newer python versions #561

Merged
merged 13 commits into from
Jan 3, 2023
49 changes: 37 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
py37:

runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
toxenv: [pyqt511, pyqt512, pyqt513]
Expand All @@ -19,10 +19,9 @@ jobs:
python-version: 3.7
- name: Install dependencies
run: |
sudo apt-get install libxkbcommon-x11-0 libexiv2-dev libboost-python-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python3.so /usr/lib/x86_64-linux-gnu/libboost_python37.so
sudo apt-get install libxkbcommon-x11-0
python -m pip install --upgrade pip
pip install tox
pip install -r misc/requirements/requirements_tox.txt
env:
PY: ${{ matrix.python-version }}
- name: Test with tox
Expand All @@ -31,25 +30,51 @@ jobs:
env:
CI: Github-Actions

py38:
py38-39:

runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
toxenv: [pyqt513, pyqt514, pyqt515-cov, piexif, noexif, lint, packaging, mypy]
python-version: [3.8, 3.9]
toxenv: [pyqt513, pyqt514, pyqt515]
fail-fast: false
steps:
- uses: actions/[email protected]
- name: Set up python 3.8
- name: Set up ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0
python -m pip install --upgrade pip
pip install -r misc/requirements/requirements_tox.txt
env:
PYVERSION: ${{ matrix.python-version }}
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
env:
CI: Github-Actions

py310:

runs-on: ubuntu-20.04
strategy:
matrix:
toxenv: [pyqt515-cov, piexif, lint, packaging, mypy]
fail-fast: false
steps:
- uses: actions/[email protected]
- name: Set up python 3.10
uses: actions/[email protected]
with:
python-version: 3.8
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libexiv2-dev libboost-python-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python3.so /usr/lib/x86_64-linux-gnu/libboost_python38.so
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0
python -m pip install --upgrade pip
pip install tox
pip install -r misc/requirements/requirements_tox.txt
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.12.0
hooks:
- id: black
args: [--force-exclude, .*syntax_error.*.py]
2 changes: 1 addition & 1 deletion misc/requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PyQt5==5.15.6
PyQt5==5.15.7
6 changes: 3 additions & 3 deletions misc/requirements/requirements_tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flaky==3.7.0
pytest==6.2.5
pytest-mock==3.6.1
pytest-qt==4.0.2
pytest==7.2.0
pytest-mock==3.10.0
pytest-qt==4.2.0
pytest-xvfb==2.0.0
pytest-bdd==4.1.0
1 change: 1 addition & 0 deletions misc/requirements/requirements_tox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tox==3.26.0
2 changes: 1 addition & 1 deletion scripts/maybe_build_cextension.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Ensure the c-extension has been build inplace for testing.
Expand Down
2 changes: 1 addition & 1 deletion scripts/pylint_checkers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Custom checkers for pylint."""
2 changes: 1 addition & 1 deletion scripts/pylint_checkers/check_count.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Checkers to ensure count is treated correctly."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/pylint_checkers/check_docstring.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Additional docstring checkers."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/pylint_checkers/check_header.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Checker to ensure each python file includes a modeline and copyright notice."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/rstutils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Utility functions to create reST files."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/src2rst.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Generate reST documentation from source code docstrings."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/vimiv_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Script to print the vimiv history of a given mode.
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import ast
Expand Down Expand Up @@ -71,6 +71,7 @@ def read_from_init(name):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Multimedia",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Graphics :: Viewers",
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Fixtures for pytest."""
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

"""Fixtures and bdd-given steps related to setup and cleanup for end2end testing."""
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import os
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_keybindings_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_mark_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import os
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_modeswitch_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_print_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_prompt_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_rename_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/api/test_working_directory_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_aliases_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_chaining_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_external_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_misccommands_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import time
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_repeat_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/command/test_search_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/commandline/test_commandline_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import contextlib
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/completion/test_completion_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import os
Expand Down
2 changes: 1 addition & 1 deletion tests/end2end/features/config/test_configcommands_bdd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4

# This file is part of vimiv.
# Copyright 2017-2022 Christian Karl (karlch) <karlch at protonmail dot com>
# Copyright 2017-2023 Christian Karl (karlch) <karlch at protonmail dot com>
# License: GNU GPL v3, see the "LICENSE" and "AUTHORS" files for details.

import pytest_bdd as bdd
Expand Down
Loading