Skip to content

Commit 06bbaf7

Browse files
ci: fix tests failing as the token-authenticator's synapse dependency is
already pointing to the master branch
1 parent 5885478 commit 06bbaf7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/famedly-tests.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Tests
55
# so a change to a pull request was triggering both. Also run tests when a tag is pushed.
66
on:
77
push:
8-
branches: [ "master", "release-*" ]
8+
branches: ["master", "release-*"]
99
tags:
1010
- "**"
1111
pull_request:
@@ -451,12 +451,16 @@ jobs:
451451
452452
- name: Update dependency to the current branch
453453
working-directory: synapse-token-authenticator
454+
# the synapse dependency of the token-authenticator is already pointing to synapse's master branch
455+
# we skip the branch update when the CI runs on master
454456
run: |
455-
sed -i 's|"matrix-synapse[^"]*"|"matrix-synapse @ git+https://github.com/${{ steps.synapse-ref.outputs.repo }}.git@${{ steps.synapse-ref.outputs.ref }}"|' pyproject.toml
456-
# Check if the file was actually modified
457-
if git diff --exit-code pyproject.toml > /dev/null; then
458-
echo "::error::The sed command did not modify pyproject.toml. Check if the 'matrix-synapse' dependency exists in the file."
459-
exit 1
457+
if [ "${{ steps.synapse-ref.outputs.ref }}" != "master" ]; then
458+
sed -i 's|"matrix-synapse[^"]*"|"matrix-synapse @ git+https://github.com/${{ steps.synapse-ref.outputs.repo }}.git@${{ steps.synapse-ref.outputs.ref }}"|' pyproject.toml
459+
# Check if the file was actually modified
460+
if git diff --exit-code pyproject.toml > /dev/null; then
461+
echo "::error::The sed command did not modify pyproject.toml. Check if the 'matrix-synapse' dependency exists in the file."
462+
exit 1
463+
fi
460464
fi
461465
462466
- name: Run token-authenticator tests

0 commit comments

Comments
 (0)