Commit Graph

70 Commits

Author SHA1 Message Date
ItsAllAboutTheCode
80e6c46ee8 Fixed Lutris UnitTest when run on github
The primary causes of the issue is the manipulation of how the gog_cloud.py and gog_cloud_hooks.py was getting imported in UnitTest via the importlib mechanism. That seemed to have broken the resolution of paths to `lutris.services.*`.
As the GTK issues that it was trying to side step has been fixed at the `tests` root level, the workaround is no longer needed.

Additional changes have been added to help harden any potentially UnitTest environment and  circular import issues.
* Updated the github unit test run to use a virtual env to install the package dependencies and run the test
* Moved the imports of `lutris.services` subpackage to the method calls inside of the `__init__.py` script which will defer any potential circular imports until after the `lutris/services/__init__.py` script is fully imported.
2026-04-11 09:47:37 -05:00
ItsAllAboutTheCode
900904c4db Added unittest run to the static analysis workflow
Also updated the pre-commit hook to invoke the test as well.

Added a nose2 plugin that skip the Dialog test when running on CI
2026-03-24 10:42:47 -05:00
Daniel Johnson
ab7b53c287 Add system dependencies to Ruff CI job for pygobject-stubs
The ruff-checker job runs `make dev` which installs pygobject-stubs,
but unlike the mypy-checker job it was missing the required Ubuntu
packages (libcairo2-dev, etc.), causing the build to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:28:59 -04:00
Daniel Johnson
ea743a236f Detect unquoted TYPE_CHECKING annotations that break on Python 3.10
Python 3.14 evaluates annotations lazily (PEP 649), so unquoted
annotations like `threading.Event` work even when `threading` is only
imported under TYPE_CHECKING. On Python 3.10, these annotations are
evaluated eagerly and raise NameError at import time.

Add utils/check_annotations.py, an AST-based checker that detects
unquoted annotations referencing TYPE_CHECKING-only imports, covering
both bare names (`HTTPResponse`) and dotted access (`threading.Event`)
— the latter being a gap in ruff's FA102 rule. Wire it into `make
annotation-compat`, `make check`, and a new CI job.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:12:14 -05:00
Mathieu Comandon
dbc01aacb0 Update release targets in PPA CI 2026-02-24 13:45:41 -08:00
Sebastien Duthil
dd0f3c45ea ruff: fix code style check 2026-02-19 12:27:56 -08:00
ItsAllAboutTheCode
860c369a53 Updating the mypy Python version check to be 3.10
Both the github workflow action and the Makefile was updated to target Python 3.10.
This is to make sure that when locally running `make check`, it matches the result of the workflow.
2026-02-17 18:21:53 -08:00
ItsAllAboutTheCode
14a93a1178 Updated the Mypy static analysis to use Python 3.9 2026-02-17 16:00:18 -08:00
Mathieu Comandon
8909940042 Install gettext in po-checker CI job
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:59:43 -08:00
Mathieu Comandon
3e8d296e70 Fix broken translations and add .po validation to CI
Fix format string errors in ru.po and tr.po that caused ValueError
on Russian locale (fixes #6423). Add msgfmt --check to CI to catch
translation errors early.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:31:37 -08:00
Mathieu Comandon
8b8ebbb175 Add syntax compatibility check for older Python versions
Prevents issues like #6419 where PEP 701 f-string syntax valid on
Python 3.12+ causes SyntaxError on older versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:21:41 -08:00
Mathieu Comandon
3a64d26dbc Add plucky (25.04) and questing (25.10) to PPA builds 2026-02-16 13:40:59 -08:00
Mathieu Comandon
ee8a94392d Add manual trigger for PPA workflow 2026-02-16 13:33:17 -08:00
Sebastien Duthil
609135bca6 github actions: make mypy check for Python 3.8 typing syntax 2026-02-16 13:29:02 -08:00
Mathieu Comandon
4b9cc907a6 Update PPA pipeline + fix OpenSUSE deps 2026-02-16 13:10:46 -08:00
Zebra2711
cf3ee38071 update girepository dev for CI
Update dependency to libgintrospection2.0-dev for PyGObject 3.51.0 compatibility
2025-03-12 22:00:00 +07:00
Mathieu Comandon
3cfacbc8d1 Add Cairo dev for CI 2024-12-28 11:43:01 -08:00
Mathieu Comandon
ffda685490 Add cairo to Ubuntu deps, use Python 3.12 for CI 2024-12-28 11:43:01 -08:00
Zitrone
6c9e01d124 remove last ruff format error and update workflow to fail on unformatted files 2024-08-11 13:55:26 -06:00
Eric Eastwood
6dffaa6394 Fix missing quote syntax error in bug report issue template
```
There is a problem with this template

YAML syntax error: (): did not find expected key while parsing a block mapping at line 20 column 7. Learn more about this error.
```
2024-05-24 23:24:53 -07:00
Mathieu Comandon
e8bfc73bbe Update Ubuntu distros 2024-04-10 23:39:22 -07:00
Rafał Mikrut
5378de4060 Add CI checks for every commit 2024-02-28 16:27:06 -08:00
Rafał Mikrut
6bf2af7efc Use ruff for formatting and code checking 2024-01-15 23:49:10 +01:00
Mathieu Comandon
aa5c460a43 Add warning about not sending bug reports for old versions 2023-11-30 15:21:03 -08:00
Mathieu Comandon
19352f9bf4 Remove fake checklist from issue template 2023-11-12 05:59:19 -08:00
Mathieu Comandon
53464a4be8 Add quotes around passphrase 2023-10-27 22:56:19 -07:00
Mathieu Comandon
55d65d00c0 Tell the truth 2023-08-24 16:07:39 -07:00
Mathieu Comandon
555daa3c7b Try with non quoted passphrase (quoted in secrets) 2023-05-16 13:12:20 -07:00
Amy Gauna
990e8c3b3b Move PPA_URI for release and staging builds into repository variables. 2023-03-07 18:08:39 -08:00
Mathieu Comandon
075a28f981 Add published to events 2023-02-14 13:34:19 -08:00
Daniel Johnson
41c75544ef Revert "Remove github issue template"
This reverts commit f6e7d86b52.

I prefer having this, rather than always having to ask for logs and such. @strycore gave his okay.
2023-01-14 19:16:36 -05:00
Amy Gauna
bd9aef3aad Update Publish Lutris PPA Workflow
* Split the workflow out into a reusable workflow.
* Call the release PPA workflow only on GitHub release publications.
* Call the staging PPA workflow on all GitHub release & prerelease publications.
* Clean up comments, and make them a bit more consistent.
* Add autoincrement logic to the PPA version number when the version we're building already exists on the target PPA.
* Build Lunar and Kinetic packages on Jammy since GitHub only has LTS Ubuntu runners.
2023-01-04 11:44:01 -08:00
Amy Gauna
b37661911c Initial commit of publish PPA GitHub workflow.
- Adds a new GitHub workflow that triggers on published releases.
- Adds a supporting Bash script to facilitate the building and signing process.
- Adds a new directive to the Makefile for passing a GPG key id to the make process through environment variables.
2022-12-12 20:34:51 -08:00
Mathieu Comandon
f6e7d86b52 Remove github issue template 2022-05-23 21:23:02 -07:00
Mathieu Comandon
23e604a309 Remove github workflows 2022-05-23 21:22:10 -07:00
Mathieu Comandon
4235360225 Fix gh test file 2022-05-23 21:19:16 -07:00
Mathieu Comandon
9f87318140 Remove poetry from gh tests 2022-05-23 21:16:51 -07:00
Mathieu Comandon
c3db08115d Add dependencies for github workflow 2022-05-23 21:02:13 -07:00
Mathieu Comandon
32c74af8f4 Remove poetry from gh workflow 2022-05-23 20:53:41 -07:00
Mathieu Comandon
aac8e986aa Remove Python 3.6 support 2022-03-31 17:10:17 -07:00
Aleksandr Oleinikov
d077dc7b8b Don't add a bug label by default for new issues 2022-02-09 06:44:36 +03:00
tannisroot
382a3213cb Update to nose2 2021-12-14 08:40:05 +03:00
tannisroot
f790b9a418 Add Python 3.10 to run_testsuite action 2021-12-14 06:53:58 +03:00
Alexandr Oleynikov
e03f91f7ff Add a note about not pruning log output 2021-11-25 20:00:44 +03:00
Alexandr Oleynikov
42c3376400 Installer related bug reports are allowed
In some cases, installer issues are related to the client, so we shouldn't forbid the user from reporting those issues.
2021-11-19 08:45:57 +03:00
Alexander Ravenheart
48d1243458 - Added nose to dev-dependencies to pyproject.toml
- Updated poetry.lock
- Replaced pipenv with poetry in run_testsuite.yml
2021-11-17 21:17:43 -08:00
Alexander Ravenheart
4174f7425c Fixed instances of unreachable code, inconsistent returns, consider-using-with, consider-using-from-import, use-a-generator, consider-using-generator, redundant-u-string-prefix, arguments-renamed 2021-11-17 21:17:43 -08:00
Alexander Ravenheart
f5e8e007b3 - Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-11-17 21:17:43 -08:00
Alexandr Oleynikov
a7d94463f8 Add some clarification to the bug report form 2021-11-18 05:29:10 +03:00
tannisroot
8eb26fba4c Add github actions testsuite 2021-11-17 13:07:12 +03:00