Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 5a275a2

Browse files
author
David Robertson
authored
Run "main" trial tests under poetry (#12438)
* Run "main" trial tests under poetry Olddeps and twisted trunk tests are handled in separate PRs. The PyPy config is a best-effort only; it's completely untested. Pulled out from #12337. * Changelog
1 parent 58c6573 commit 5a275a2

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.github/workflows/tests.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,23 @@ jobs:
6565
matrix:
6666
python-version: ["3.7", "3.8", "3.9", "3.10"]
6767
database: ["sqlite"]
68-
toxenv: ["py"]
68+
extras: ["all"]
6969
include:
7070
# Newest Python without optional deps
7171
- python-version: "3.10"
72-
toxenv: "py-noextras"
72+
extras: ""
7373

7474
# Oldest Python with PostgreSQL
7575
- python-version: "3.7"
7676
database: "postgres"
7777
postgres-version: "10"
78-
toxenv: "py"
78+
extras: "all"
7979

8080
# Newest Python with newest PostgreSQL
8181
- python-version: "3.10"
8282
database: "postgres"
8383
postgres-version: "14"
84-
toxenv: "py"
84+
extras: "all"
8585

8686
steps:
8787
- uses: actions/checkout@v2
@@ -93,17 +93,16 @@ jobs:
9393
-e POSTGRES_PASSWORD=postgres \
9494
-e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
9595
postgres:${{ matrix.postgres-version }}
96-
- uses: actions/setup-python@v2
96+
- uses: matrix-org/setup-python-poetry@v1
9797
with:
9898
python-version: ${{ matrix.python-version }}
99-
- run: pip install tox
99+
extras: ${{ matrix.extras }}
100100
- name: Await PostgreSQL
101101
if: ${{ matrix.postgres-version }}
102102
timeout-minutes: 2
103103
run: until pg_isready -h localhost; do sleep 1; done
104-
- run: tox -e ${{ matrix.toxenv }}
104+
- run: poetry run trial --jobs=2 tests
105105
env:
106-
TRIAL_FLAGS: "--jobs=2"
107106
SYNAPSE_POSTGRES: ${{ matrix.database == 'postgres' || '' }}
108107
SYNAPSE_POSTGRES_HOST: localhost
109108
SYNAPSE_POSTGRES_USER: postgres
@@ -150,23 +149,24 @@ jobs:
150149
151150
trial-pypy:
152151
# Very slow; only run if the branch name includes 'pypy'
152+
# Note: sqlite only; no postgres. Completely untested since poetry move.
153153
if: ${{ contains(github.ref, 'pypy') && !failure() && !cancelled() }}
154154
needs: linting-done
155155
runs-on: ubuntu-latest
156156
strategy:
157157
matrix:
158158
python-version: ["pypy-3.7"]
159+
extras: ["all"]
159160

160161
steps:
161162
- uses: actions/checkout@v2
163+
# Install libs necessary for PyPy to build binary wheels for dependencies
162164
- 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
164166
with:
165167
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
170170
- name: Dump logs
171171
# Logs are most useful when the command fails, always include them.
172172
if: ${{ always() }}

changelog.d/12438.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Run "main" trial tests under `poetry`.

0 commit comments

Comments
 (0)