This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use poetry lockfile in twisted trunk CI job #12425
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d786f99
Use poetry lockfile in twisted trial environment
09af56d
Changelog
3e8e5ef
Bump locked version of prometheus-client to 0.14.0
callahad 32b281b
Apply review feedback
callahad 0199f95
Restore calls to `poetry remove twisted`
callahad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,41 @@ on: | |
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: .ci/patch_for_twisted_trunk.sh | ||
- run: pip install tox | ||
- run: tox -e mypy | ||
- uses: matrix-org/setup-python-poetry@v1 | ||
with: | ||
python-version: "3.x" | ||
extras: "all" | ||
- run: | | ||
poetry remove twisted | ||
poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk | ||
poetry install --no-interaction --extras "all test" | ||
- run: poetry run mypy | ||
|
||
trial: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt-get -qq install xmlsec1 | ||
- uses: actions/setup-python@v2 | ||
- uses: matrix-org/setup-python-poetry@v1 | ||
with: | ||
python-version: 3.7 | ||
- run: .ci/patch_for_twisted_trunk.sh | ||
- run: pip install tox | ||
- run: tox -e py | ||
env: | ||
TRIAL_FLAGS: "--jobs=2" | ||
python-version: "3.x" | ||
extras: "all test" | ||
- run: | | ||
poetry remove twisted | ||
poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk | ||
poetry install --no-interaction --extras "all test" | ||
- run: poetry run trial --jobs 2 tests | ||
|
||
- name: Dump logs | ||
# Logs are most useful when the command fails, always include them. | ||
|
@@ -55,11 +65,24 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Patch dependencies | ||
run: .ci/patch_for_twisted_trunk.sh | ||
# Note: The script below runs poetry against a virtualenv in /src/.venv/ | ||
# ...but the sytest-synapse container expects it to be in /venv/ | ||
# So we temporarily symlink it, run poetry, then remove the link. | ||
# Tidying up is important because `/src` is a mounted volume. | ||
richvdh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
ln -s -T /venv /src/.venv | ||
poetry remove twisted | ||
poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk | ||
poetry install --no-interaction --extras "all test" | ||
rm /src/.venv | ||
callahad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
working-directory: /src | ||
- name: Run SyTest | ||
run: /bootstrap.sh synapse | ||
working-directory: /src | ||
env: | ||
# Use offline mode to avoid reinstalling the pinned version of | ||
# twisted. | ||
OFFLINE: 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think he twisted trunk CI jobs from today were using the locked environment without this patch? |
||
- name: Summarise results.tap | ||
if: ${{ always() }} | ||
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Run twisted trunk CI job in the locked poetry environment. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly amazed that works, but ok!