@@ -65,23 +65,23 @@ jobs:
65
65
matrix :
66
66
python-version : ["3.7", "3.8", "3.9", "3.10"]
67
67
database : ["sqlite"]
68
- toxenv : ["py "]
68
+ extras : ["all "]
69
69
include :
70
70
# Newest Python without optional deps
71
71
- python-version : " 3.10"
72
- toxenv : " py-noextras "
72
+ extras : " "
73
73
74
74
# Oldest Python with PostgreSQL
75
75
- python-version : " 3.7"
76
76
database : " postgres"
77
77
postgres-version : " 10"
78
- toxenv : " py "
78
+ extras : " all "
79
79
80
80
# Newest Python with newest PostgreSQL
81
81
- python-version : " 3.10"
82
82
database : " postgres"
83
83
postgres-version : " 14"
84
- toxenv : " py "
84
+ extras : " all "
85
85
86
86
steps :
87
87
- uses : actions/checkout@v2
@@ -93,17 +93,16 @@ jobs:
93
93
-e POSTGRES_PASSWORD=postgres \
94
94
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
95
95
postgres:${{ matrix.postgres-version }}
96
- - uses : actions /setup-python@v2
96
+ - uses : matrix-org /setup-python-poetry@v1
97
97
with :
98
98
python-version : ${{ matrix.python-version }}
99
- - run : pip install tox
99
+ extras : ${{ matrix.extras }}
100
100
- name : Await PostgreSQL
101
101
if : ${{ matrix.postgres-version }}
102
102
timeout-minutes : 2
103
103
run : until pg_isready -h localhost; do sleep 1; done
104
- - run : tox -e ${{ matrix.toxenv }}
104
+ - run : poetry run trial --jobs=2 tests
105
105
env :
106
- TRIAL_FLAGS : " --jobs=2"
107
106
SYNAPSE_POSTGRES : ${{ matrix.database == 'postgres' || '' }}
108
107
SYNAPSE_POSTGRES_HOST : localhost
109
108
SYNAPSE_POSTGRES_USER : postgres
@@ -150,23 +149,24 @@ jobs:
150
149
151
150
trial-pypy :
152
151
# Very slow; only run if the branch name includes 'pypy'
152
+ # Note: sqlite only; no postgres. Completely untested since poetry move.
153
153
if : ${{ contains(github.ref, 'pypy') && !failure() && !cancelled() }}
154
154
needs : linting-done
155
155
runs-on : ubuntu-latest
156
156
strategy :
157
157
matrix :
158
158
python-version : ["pypy-3.7"]
159
+ extras : ["all"]
159
160
160
161
steps :
161
162
- uses : actions/checkout@v2
163
+ # Install libs necessary for PyPy to build binary wheels for dependencies
162
164
- run : sudo apt-get -qq install xmlsec1 libxml2-dev libxslt-dev
163
- - uses : actions /setup-python@v2
165
+ - uses : matrix-org /setup-python-poetry@v1
164
166
with :
165
167
python-version : ${{ matrix.python-version }}
166
- - run : pip install tox
167
- - run : tox -e py
168
- env :
169
- TRIAL_FLAGS : " --jobs=2"
168
+ extras : ${{ matrix.extras }}
169
+ - run : poetry run trial --jobs=2 tests
170
170
- name : Dump logs
171
171
# Logs are most useful when the command fails, always include them.
172
172
if : ${{ always() }}
0 commit comments