Commit Graph

199 Commits

Author SHA1 Message Date
Florian Bruhin 22f1b57347 lint: Move check-manifest into pyroma
pyroma now runs check-manifest if installed,
so we can simplify things there.
2025-07-07 08:09:47 +02:00
Florian Bruhin 9219869cb9 ci: Test on windows-2022 and windows-2025
windows-2019 is deprecated: https://github.com/actions/runner-images/issues/12045
2025-06-05 11:38:42 +02:00
Florian Bruhin 0b5f70f029 ci: Switch to Qt 6.9 for Windows/macOS
That's what we're shipping, so we should also test that.
2025-06-05 11:36:33 +02:00
Florian Bruhin 858606c18d ci: Remove QtWebKit testing
It's broken in weird ways since recently (`:version` not loading,
segfault in test_version.py). Since nobody should be using it anyways,
there is no point in spending time on debugging a tricky issue.

Next step is probably ripping it out completely, but that's a separate
can of worms.

See #4039
2025-05-13 09:29:04 +02:00
Florian Bruhin 05b42c57ee ci: Fix config properly... 2025-04-13 13:40:37 +02:00
Florian Bruhin 77b5c0c1cd ci: Fix config 2025-04-13 13:37:44 +02:00
Florian Bruhin 84ec45c13f ci: Try Python 3.14 again
Cache is now cleared, so it might just work
2025-04-13 13:28:34 +02:00
Florian Bruhin 13b87e5968 ci: Avoid Python 3.14 Alpha 7
See https://www.riverbankcomputing.com/pipermail/pyqt/2025-April/046210.html and #8529
2025-04-11 17:18:06 +02:00
Florian Bruhin 8b820f015b ci/tox/requirements: Update for Qt 6.9 2025-04-08 21:09:32 +02:00
Florian Bruhin 4e5eb90857 ci: Fix Python 3.14 Pillow build 2025-04-02 13:34:27 +02:00
Florian Bruhin 72647298b7 ci: Fix Python 3.14 derp 2025-04-02 13:31:55 +02:00
Florian Bruhin 71381c0da6 ci: Try to fix Python 3.14 version 2025-04-02 13:30:46 +02:00
Florian Bruhin 3aa839998b Python 3.14: Add to tox/CI
Part of #8529
2025-04-02 13:22:35 +02:00
Florian Bruhin 33ba05c657 ci: Go back to Ubuntu 22.04 for Docker
See #8424
2025-02-24 09:43:42 +01:00
Florian Bruhin 1a6d32cc3d ci: Upgrade Ubuntu versions
Avoid deprecated Ubuntu 20.04 which will be unsupported in April:
https://github.com/actions/runner-images/issues/11101

For Qt 6.8 and auxiliary jobs (linters etc.), switch from 22.04 to 24.04.
2025-02-23 22:23:01 +01:00
Florian Bruhin 3f5ce51502 ci: Back to Ubuntu 22.04
Follow-up to 531b28771c as some stuff broke
2024-12-14 22:27:15 +01:00
Florian Bruhin 5a153d76ea Use/recommend libegl1 without -mesa
libegl1-mesa was a "transactional dummy package" as early as Ubuntu 20.04, and
got removed in 22.04.

See https://packages.ubuntu.com/search?keywords=libegl1-mesa&searchon=names&suite=all&section=all
2024-12-14 21:50:10 +01:00
Florian Bruhin 531b28771c ci: Upgrade some jobs from Ubuntu 20.04 to 24.04
Ubuntu 20.04 will be EOL in April 2025, and PyQt 6.8 does not support being
installed on it anymore:
https://pyqt-builder.readthedocs.io/en/stable/releases.html

Other than for the oldest Qt 5 / Qt 6 envs, and for utility envs, let's use
Ubuntu 22.04 or 24.04.
2024-12-14 21:20:15 +01:00
Florian Bruhin f8ce3a932c ci: Upgrade node version
Not strictly necessary, just a drive-by fix.
2024-12-10 17:47:12 +01:00
Florian Bruhin 3a956b4097 ci: Add preliminary PyQt 6.8 environment
See #8242
2024-12-09 20:16:27 +01:00
Florian Bruhin bb652cc108 ci: Fix up Python versions
Follow-up to b1ad5c2e30
2024-12-09 20:14:10 +01:00
Florian Bruhin b1ad5c2e30 ci: Use Python 3.13
- Newest Linux/macOS/Windows environments (should be roughly same as release,
  especially for Windows/macOS)
- Nightly binary builds
- Release automation

Closes #8205
2024-12-09 16:14:48 +01:00
Florian Bruhin 69ac04d389 Drop macOS 12
The GHA runner is gone now: https://github.com/actions/runner-images/issues/10721

Closes #8327
2024-12-04 20:56:22 +01:00
dependabot[bot] 4b7cc881ec Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 00:06:49 +00:00
Florian Bruhin af884a02c8 ci: Upgrade codecov action 2024-11-10 20:01:44 +01:00
Florian Bruhin ffe7d00a62 Merge branch 'drop-py38' 2024-10-15 11:58:54 +02:00
Florian Bruhin bd3774dfc8 Drop Python 3.8 from tox/CI 2024-10-13 18:24:44 +02:00
toofar 3a48111e53 update node version for eslint
Github is updating all their actions to node 20, may as well do the same
here? Not strong need to update it, just spotted this.
2024-10-05 13:55:15 +13:00
toofar 914227ca1c Set TMPDIR to RUNNER_TEMP on CI
The upload artifact action can't collect artifacts from /tmp/ in the test
runners. So now that we are writing the screenshots that we want to collect
later to the pytest `tmp_path` location we need to make sure that lives
somewhere the later actions can find it.

Pytest uses `tempfile.gettempdir()` to find the temp dir, and that respects a
number of environment variables including `TMPDIR`. This commits sets TMPDIR
to RUNNER_TEMP in in our test runners to make pytest uses the temp dir that's
mounted into the action containers.

For the docker based runners I can use the `env` map, but for the ubuntu ones
it didn't let me expand `${{ runner.temp }}` in the end map under `step`, so
I'm writing it to the env file for the runner instead. It failed to parse the
action yaml and said:

    > Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp

For the user part of the `pytest-of-$user` directory, I looked at the new
screenshot related test summary lines to see what the user was called.
`runner` on the ubuntu containers and `user` in our docker containers. Pytest
maintains the "pytest-current" symlink to the latest temp folder.
2024-08-18 12:42:35 +12:00
toofar a3238eb494 upload e2e failure screenshots as artifacts
This commit takes a screenshot of the active browser window when an
end2end test fails. When running on CI a zip file of screenshots will be
attached to the run summary as an artifact. When run locally screenshots
will be left in /$TMPDIR/pytest-screenshots/.

The screenshot is of the Xvfb screen that the tests are running under.
If there are multiple windows open it will likely only show the active
window because a) we aren't running with a window manager b) the Xvfb
display is, by default, the same size as the browser window.

I'm not sure if xvfb is used on the Window runs in CI. We could fall
back to trying to take screenshots if not running under xvfb but I'm a
bit wary of an automatic feature that takes screenshots of people's
desktops when running locally. Even if they just to to /tmp/ it might be
surprising. We can change it later if it turns out we need to try to
take screenshots in more cases.

I'm using pillow ImageGrab, the same as pyvirtualdisplay.smartdisplay. I'm
getting the display number from the pytest-xvfb plugin and formatting it
appropriately (pyvirtualdisplay has an already formatted one which is used by
the smartdisplay, but that's not accessible).

Pillow is now a requirement for running the tests. I thought about making
it gracefully not required but I'm not sure how to inform the user with
a warning from pytest, or if they would even want one. Maybe we could
add a config thing to allow not taking screenshots?

I had to bump the colordepth config for pytest-xvfb otherwise pillow
complained that the default 16bit color depth wasn't supported as it
only supports 24bit, see https://github.com/python-pillow/Pillow/blob/1138ea5370cbda5eb328ec949
8c314d376c81265/src/display.c#L898

I'm saving screenshots to a temp dir because I don't want to put them in
my workdir when running locally. I want to clear the directory for each
run so that you don't get confused by looking at old images. I'm not
100% sure about the lifecycle of the process classes though. Eg if we
have two processes they might both try to create the output directory.
I'm using pytest.session.stash to save the directory so perhaps the
lifecycle of the stash will handle that? Not sure.

Ideally the images would be uploaded somewhere where we could click
through and open them in the browser without having to download a zip
file, but I'm not sure how to achieve that.

It would be nice to print in the test logs that a screenshot was saved
and where to. Just so you could copy paste the filename instead of
having to match the sanitized filename against failing test names. But I
don't know how to log stuff from this stage in the pytest lifecycle.

TODO:
* I'm not sure that the screenshot captures the whole browser window?
  Maybe the browser windows is bigger than the X11 display?

Closes: #7625
2024-08-18 12:42:29 +12:00
Florian Bruhin b78fc5765a ci: Drop macOS 11
Will be dropped on GitHub Actions tomorrow:
https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/

For unit tests, we now run them on macOS 13 instead, thus testing on all three
macOS versions we currently support.

For releases, this forces us to now support macOS 12 as the oldest supported
version and drop macOS 11 support. Thus, we should not have a v3.2.2 release.

Not backporting this commit so CI fails there rather than silently bumping up
requirements.
2024-06-27 22:04:40 +02:00
Florian Bruhin 27164d0d6e Build separate Apple Silicon release
With GitHub Actions now providing macOS 14 runners with M1 chips, we can
build a separate Apple Silicon release there and upload it.

Universal wheels are currently not possible, see #8229 for details.

Closes #6478
2024-06-11 23:01:47 +02:00
toofar 22370b457f Install recent pdf.js in some CI jobs
This installs pdf.js in a selection of CI jobs. Previously the PDF.js
tests (in qutescheme.feature) were skipped in CI because it wasn't
installed anywhere. There has been a couple of recent cases where pdf.js
started depending on javascript features that are too new for even the
most recent QtWebEngine to support. The aim of this commit is to catch
that case. This doesn't add coverage for older webengine releases.

This also incidentally updates the ace editor in these test jobs, since that is
also updated by default by the update_3rdparty script. Hopefully that
doesn't cause issues.

The reasoning for installing on each type of job:

*ubuntu jobs*: not installed - while our main test runs are on ubuntu
  there is an upstream issue where many assets used by pdf.js (like icons
  used in the toolbar) aren't packaged, see #7904. This causes warning
  messages because assets requested via qutescheme can't be found, which
  causes the tests to fail. We could a) install pdf.js from source instead
  of using the ubuntu one b) ignore the warning logs c) skip this
  environment and rely on tests elsewhere. I've chosen to do (c). I don't
  see a huge benefit in testing pdf.js across multiple environments if we
  aren't using it installed from the OS anyway. We could install from
  source but currently all the Qt < 6.5 tests are failing from some other
  JS error, and I think fixing that is out of scope of this issue.

*docker Qt6*: installed - the archlinux pdfjs package works fine and we are
  only testing the most recent Qt versions because arch users are expected
  to stay up to date.

*docker Qt5*: not installed - doesn't support JS features required by
  PDF.js. I guess we could install the legacy build from source here. I'm
  mostly worried about catching new breakages for this commit though

*windows*: installed - we install pdf.js from source when making a
  release so it would be nice to do that in tests too.

*macos*: not installed - the tests that were catching the breakages are
  end2end tests which we don't run on mac. And I think there was an
  error from the :versions tests here, don't remember.

*bleeding edge*: installed - from source

pdf.js tests fail on Qt < 6.5 with `Uncaught TypeError: Cannot read
properties of null (reading 'mainContainer')`

The `TestPDFJSVersion.test_real_file` unit tests currently fails because
`version._pdfjs_version()` returns `unknown (bundled)`, not sure why. I
think this is pre-existing and it also wasn't being run on CI.
2024-05-25 09:41:44 +12:00
toofar 3f1842b729 Update requirements and CI for PyQt6.7
6.7 is released now, some distros are already shipping it!

This commit:
1. adds a new 6.7 requirements file (the plain 6 one has already been
   updated by the bot)
2. adds a new tox env referring to the new requirements file
3. updates the mac and windows installer jobs to run with pyqt67 with the
   assumption we'll be including that in our next release
4. adds two new CI environments for 6.7, one each for python 3.11 and 3.12
   (3.12 only came out like 6 months ago)
5. updates a couple of references to the py37 tox env that looked like they
   were missed, 3.7 support was dropped in 93c7fdd
6. updates various ubuntu containers to the latest LTS instead of the previous
   related one - this is quite unrelated to this change but I thought I would
   give it a go, no need to use the old one unless we are specifically testing
   on it?
   - linters - they use tox but probably use system libraries
   - these all run in nested containers anyway, should be fully isolated
   - codeql - eh, uses a third party action, check the docs if it fails
   - irc - as above
2024-05-24 17:08:56 +02:00
toofar 0a541983c3 Pin eslint for now until we support v9+
See https://github.com/qutebrowser/qutebrowser/issues/8159
2024-04-06 18:30:25 +13:00
dependabot[bot] 238c97f71e
build(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 18:56:48 +00:00
dependabot[bot] 4c431fd22d
build(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 18:32:14 +00:00
dependabot[bot] 3d9bf9651f
build(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:33:46 +00:00
Florian Bruhin 4928153227 Upgrade release Python to 3.12 2023-12-08 15:44:18 +01:00
toofar 4227aba7ba Update mac and windows CI to target for next release
It looks like our last release builds were done with python 3.11 and
PyQt 6.5.3. I'm expecting that since PyQt6.6 is out now our next release
will be on 6.6. So lets update the CI to match.

Questions:
* what about python12? I don't think there is a benefit to updating to
  that, so lets leave it.
* what about pyqt6.5? Do we care about testing that? Maybe for homebrew
  users? We aren't providing new builds with an old Qt right?

last release builds: https://github.com/qutebrowser/qutebrowser/actions/runs/6578864884

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar 1683b74aba bump py311 and py12 tests to use pyqt6.6
I'm not sure if we need a py3.11 pyqt6.5 variant or a py3.10 pyqt6.6
one? Those might well be combinations that people have (debian has 3.11
and 6.5 at the moment) but how much coverage do we need?

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar b4215d31b3 py3.12 is released now
ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
dependabot[bot] f53933b329
build(deps): bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 18:49:54 +00:00
dependabot[bot] 37172cf9cc
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:36:00 +00:00
Philipp Albrecht 7d445e6617 Add CI job for package build
We want to run a package build in CI with warnings turned into exceptions, in order to
catch issues in CI (e.g. DeprecationWarning).
2023-08-09 12:46:58 +02:00
Florian Bruhin 6478496ca3 Revert "Revert "Revert "ci: Remove Python 3.12 for now"""
This reverts commit 70e8dc63e8.

We're on PyQt 6.5.2 now, which should fix the segfaults on exit.
2023-07-24 20:12:52 +02:00
Florian Bruhin 8f34a2c9c6 ci: Fix issues 2023-06-30 19:29:28 +02:00
Florian Bruhin b5d5c7f4d3 More qt 6 tooling 2023-06-30 19:29:28 +02:00
Florian Bruhin 50a1f004f0 qt6 mypy: Enable on CI 2023-06-29 23:16:35 +02:00
Florian Bruhin 93c7fdd60c Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00