mirror of
https://github.com/element-hq/synapse.git
synced 2026-03-30 15:05:48 +00:00
Add in-repo Complement test to sanity check Synapse version matches git checkout (#19476)
This way we actually detect problems like https://github.com/element-hq/synapse/pull/19475 as they happen instead of being invisible until something breaks. Sanity check that Complement is testing against your code changes (whether it be local or from the PR in CI). ``` COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh --in-repo -run TestSynapseVersion ```
This commit is contained in:
@@ -215,11 +215,17 @@ main() {
|
||||
$CONTAINER_RUNTIME run --rm -v $editable_mount --entrypoint 'cp' "$COMPLEMENT_SYNAPSE_EDITABLE_IMAGE_PATH" -- /synapse_rust.abi3.so.bak /editable-src/synapse/synapse_rust.abi3.so
|
||||
|
||||
else
|
||||
# We remove the `egg-info` as it can contain outdated information which won't line
|
||||
# up with our current reality.
|
||||
rm -rf matrix_synapse.egg-info/
|
||||
# Figure out the Synapse version string in our current checkout
|
||||
synapse_version_string="$(poetry run python -c 'from synapse.util import SYNAPSE_VERSION; print(SYNAPSE_VERSION)')"
|
||||
|
||||
# Build the base Synapse image from the local checkout
|
||||
echo_if_github "::group::Build Docker image: matrixdotorg/synapse"
|
||||
$CONTAINER_RUNTIME build \
|
||||
-t "$SYNAPSE_IMAGE_PATH" \
|
||||
--build-arg SYNAPSE_VERSION_STRING="$synapse_version_string" \
|
||||
--build-arg TEST_ONLY_SKIP_DEP_HASH_VERIFICATION \
|
||||
--build-arg TEST_ONLY_IGNORE_POETRY_LOCKFILE \
|
||||
-f "docker/Dockerfile" .
|
||||
|
||||
Reference in New Issue
Block a user