Commit Graph

40 Commits

Author SHA1 Message Date
dependabot[bot] 615cee7309 build(deps): bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 12:51:19 +01:00
dependabot[bot] 0570545342 build(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [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/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-30 00:15:59 +01:00
Florian Bruhin 9316d428ef ci: Drop Archlinux Qt 5 images/jobs
For now, Qt 5 is still tested via the Qt 5.15 PyPI wheels.

See https://github.com/qutebrowser/qutebrowser/issues/8417#issuecomment-3495979318
https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/U45C4RAW4IXVLO376XGFNLEGGFFXCULV/
2025-11-11 09:13:30 +01:00
dependabot[bot] 214e2e9ac2 build(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 20:41:53 +01:00
dependabot[bot] 745bb7f4f0
build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 01:09:55 +00: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 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 9e70ffeaad Switch to legacy PDF.js build
The normal PDF.js build only officially supports the latest Chromium, so things
might break every once in a while with QtWebEngine (e.g. #8199, #7335).

Let's instead bundle and recommend the legacy build.

Closes #8332
Closes #7721 (reworded)
Also see #7135
2024-12-10 11:47:39 +01: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
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
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
Florian Bruhin a196344742 ci: Use proper image for Qt 6 bleeding tests 2023-08-15 19:31:36 +02:00
Florian Bruhin 8221fd7878 wip: Add Qt 6 bleeding tests to CI 2023-08-15 18:57:17 +02:00
Florian Bruhin 9a90a3950f wip: Add Qt 6 bleeding tests to CI 2023-08-15 18:30:00 +02:00
Florian Bruhin ab258e7aab ci: Bump timeouts to 45m
Looks like 30m is a bit tight when GHA is exceptionally busy
2023-01-19 09:51:51 +01:00
Florian Bruhin df9abc5c23 ci: More colored output 2022-07-11 10:36:23 +02:00
Florian Bruhin 47ef35fb31 ci: Update dependendicies 2022-06-22 12:50:28 +02:00
Florian Bruhin 3ac1c8a7a3 ci: Split bleeding CI and nightly builds into two 2022-06-21 20:45:20 +02:00
Florian Bruhin e494100582 ci: Switch to FORCE_COLOR
pytest understands that since a while: https://pytest.org/en/7.0.x/reference/reference.html#environment-variables and other tools are adopting it: https://github.com/sphinx-doc/sphinx/pull/10260
2022-03-30 09:57:53 +02:00
Florian Bruhin 5e475f4151 ci: Thanks YAML 2021-11-22 18:09:17 +01:00
Florian Bruhin cac9e3e049 ci: Use Python 3.10 for bleeding CI 2021-11-22 17:53:51 +01:00
Florian Bruhin f2e322c581 ci: Switch to #qutebrowser-bots 2021-05-27 09:28:31 +02:00
Florian Bruhin b366911d0a ci: Switch bots to Libera 2021-05-26 10:54:32 +02:00
Florian Bruhin 493d7470c4 ci: Try to avoid upload load
I suspect we get issues because 6 jobs try to upload at the same time
2021-05-14 14:34:56 +02:00
Florian Bruhin 8023b8c8fe ci: Lock down workflows
Closes #6430
2021-04-28 23:01:43 +02:00
Florian Bruhin bce20c2995 scripts: Add --debug to build_release.py 2021-03-29 23:42:14 +02:00
Florian Bruhin 2a545400f8 ci: Try debug builds 2021-03-29 23:42:14 +02:00
Florian Bruhin 78ce753b09 ci: Move macOS dmg to dist/ 2021-03-29 23:42:14 +02:00
Florian Bruhin 99f419c97d ci: Rename artifact 2021-03-29 23:42:14 +02:00
Florian Bruhin c6118aa4aa ci: Upload release files 2021-03-29 23:42:14 +02:00
Florian Bruhin 498ff53463 ci: Split 32/64bit pyinstaller envs 2021-03-29 23:42:14 +02:00
Florian Bruhin 8a0d7a5be8 scripts: Pass GitHub token via commandline args 2021-03-29 23:42:14 +02:00
Florian Bruhin e10214a726 ci: Fix asciidoc
Unfortunately, GitHub won't let us clone asciidoc to ../asciidoc :(
2021-03-29 23:42:14 +02:00
Florian Bruhin a93b1f00c9 ci: Try docs as well 2021-03-29 23:42:14 +02:00
Florian Bruhin 353b27df53 ci: Add PyInstaller env
Closes #6338
2021-03-29 23:42:09 +02:00
Florian Bruhin e017927173 ci: Run bleeding-edge CI daily for now 2021-03-29 18:44:17 +02:00
Florian Bruhin 18d6c46e3d notifications: Adjust/fix CI 2021-03-24 16:38:59 +01:00
Florian Bruhin 36696bfa2c ci: Add bleeding-edge environment
Closes #6298
2021-03-22 20:22:48 +01:00