mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-21 03:42:55 +03:00
eda735e4bb
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters)) --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
36 lines
1.4 KiB
Bash
Executable file
36 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# this script is run by GitHub Actions in a plain `jammy` container; it
|
|
# - installs the minimal system requirements, and poetry;
|
|
# - patches the project definition file to refer to old versions only;
|
|
# - creates a venv with these old versions using poetry; and finally
|
|
# - invokes `trial` to run the tests with old deps.
|
|
|
|
set -ex
|
|
|
|
# Prevent virtualenv from auto-updating pip to an incompatible version
|
|
export VIRTUALENV_NO_DOWNLOAD=1
|
|
|
|
# TODO: in the future, we could use an implementation of
|
|
# https://github.com/python-poetry/poetry/issues/3527
|
|
# https://github.com/pypa/pip/issues/8085
|
|
# to select the lowest possible versions, rather than resorting to this sed script.
|
|
|
|
# Patch the project definitions in-place:
|
|
# - Replace all lower and tilde bounds with exact bounds
|
|
# - Replace all caret bounds---but not the one that defines the supported Python version!
|
|
# - Delete all lines referring to psycopg2 --- so no testing of postgres support.
|
|
# - Use pyopenssl 17.0, which is the oldest version that works with
|
|
# a `cryptography` compiled against OpenSSL 1.1.
|
|
# - Omit systemd: we're not logging to journal here.
|
|
|
|
sed -i \
|
|
-e "s/[~>]=/==/g" \
|
|
-e '/^python = "^/!s/\^/==/g' \
|
|
-e "/psycopg2/d" \
|
|
-e 's/pyOpenSSL = "==16.0.0"/pyOpenSSL = "==17.0.0"/' \
|
|
-e '/systemd/d' \
|
|
pyproject.toml
|
|
|
|
echo "::group::Patched pyproject.toml"
|
|
cat pyproject.toml
|
|
echo "::endgroup::"
|