6
6
7
7
workflow_dispatch :
8
8
9
+ concurrency :
10
+ group : ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress : true
12
+
9
13
jobs :
10
14
mypy :
11
15
runs-on : ubuntu-latest
12
16
13
17
steps :
14
18
- uses : actions/checkout@v2
15
- - uses : actions/setup-python@v2
16
- - run : .ci/patch_for_twisted_trunk.sh
17
- - run : pip install tox
18
- - run : tox -e mypy
19
+ - uses : matrix-org/setup-python-poetry@v1
20
+ with :
21
+ python-version : " 3.x"
22
+ extras : " all"
23
+ - run : |
24
+ poetry remove twisted
25
+ poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk
26
+ poetry install --no-interaction --extras "all test"
27
+ - run : poetry run mypy
19
28
20
29
trial :
21
30
runs-on : ubuntu-latest
22
31
23
32
steps :
24
33
- uses : actions/checkout@v2
25
34
- run : sudo apt-get -qq install xmlsec1
26
- - uses : actions /setup-python@v2
35
+ - uses : matrix-org /setup-python-poetry@v1
27
36
with :
28
- python-version : 3.7
29
- - run : .ci/patch_for_twisted_trunk.sh
30
- - run : pip install tox
31
- - run : tox -e py
32
- env :
33
- TRIAL_FLAGS : " --jobs=2"
37
+ python-version : " 3.x"
38
+ extras : " all test"
39
+ - run : |
40
+ poetry remove twisted
41
+ poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk
42
+ poetry install --no-interaction --extras "all test"
43
+ - run : poetry run trial --jobs 2 tests
34
44
35
45
- name : Dump logs
36
46
# Logs are most useful when the command fails, always include them.
@@ -55,11 +65,23 @@ jobs:
55
65
steps :
56
66
- uses : actions/checkout@v2
57
67
- name : Patch dependencies
58
- run : .ci/patch_for_twisted_trunk.sh
68
+ # Note: The poetry commands want to create a virtualenv in /src/.venv/,
69
+ # but the sytest-synapse container expects it to be in /venv/.
70
+ # We symlink it before running poetry so that poetry actually
71
+ # ends up installing to `/venv`.
72
+ run : |
73
+ ln -s -T /venv /src/.venv
74
+ poetry remove twisted
75
+ poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk
76
+ poetry install --no-interaction --extras "all test"
59
77
working-directory : /src
60
78
- name : Run SyTest
61
79
run : /bootstrap.sh synapse
62
80
working-directory : /src
81
+ env :
82
+ # Use offline mode to avoid reinstalling the pinned version of
83
+ # twisted.
84
+ OFFLINE : 1
63
85
- name : Summarise results.tap
64
86
if : ${{ always() }}
65
87
run : /sytest/scripts/tap_to_gha.pl /logs/results.tap
0 commit comments