summary refs log tree commit diff
path: root/.github/workflows/tests.yml
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-05-12 11:21:11 +0100
committerGitHub <noreply@github.com>2023-05-12 11:21:11 +0100
commitc96a1d2a27e3fe84b2648d375317cba38bc4654b (patch)
treec2b036cfc463e4df15be733451fcebcc12f84196 /.github/workflows/tests.yml
parentAdd pkg-config package to Stage 0 (#15567) (diff)
downloadsynapse-c96a1d2a27e3fe84b2648d375317cba38bc4654b.tar.xz
Relax poetry-core lower bound to 1.1.0 (#15571)
See https://github.com/matrix-org/synapse/pull/15566#issuecomment-1543844104

Also check you can `pip install` in the old-deps CI job
Diffstat (limited to '.github/workflows/tests.yml')
-rw-r--r--.github/workflows/tests.yml37
1 files changed, 14 insertions, 23 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index e128fd54f7..51cbeb3298 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -321,34 +321,25 @@ jobs:
         with:
           python-version: '3.7'
 
-      # Calculating the old-deps actually takes a bunch of time, so we cache the
-      # pyproject.toml / poetry.lock. We need to cache pyproject.toml as
-      # otherwise the `poetry install` step will error due to the poetry.lock
-      # file being outdated.
-      #
-      # This caches the output of `Prepare old deps`, which should generate the
-      # same `pyproject.toml` and `poetry.lock` for a given `pyproject.toml` input.
-      - uses: actions/cache@v3
-        id: cache-poetry-old-deps
-        name: Cache poetry.lock
-        with:
-          path: |
-            poetry.lock
-            pyproject.toml
-          key: poetry-old-deps2-${{ hashFiles('pyproject.toml') }}
       - name: Prepare old deps
         if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true'
         run: .ci/scripts/prepare_old_deps.sh
 
-      # We only now install poetry so that `setup-python-poetry` caches the
-      # right poetry.lock's dependencies.
-      - uses: matrix-org/setup-python-poetry@v1
-        with:
-          python-version: '3.7'
-          poetry-version: "1.3.2"
-          extras: "all test"
+      # Note: we install using `pip` here, not poetry. `poetry install` ignores the
+      # build-system section (https://github.com/python-poetry/poetry/issues/6154), but
+      # we explicitly want to test that you can `pip install` using the oldest version
+      # of poetry-core and setuptools-rust.
+      - run: pip install .[all,test]
+
+      # We nuke the local copy, as we've installed synapse into the virtualenv
+      # (rather than use an editable install, which we no longer support). If we
+      # don't do this then python can't find the native lib.
+      - run: rm -rf synapse/
+
+      # Sanity check we can import/run Synapse
+      - run: python -m synapse.app.homeserver --help
 
-      - run: poetry run trial -j6 tests
+      - run: python -m twisted.trial -j6 tests
       - name: Dump logs
         # Logs are most useful when the command fails, always include them.
         if: ${{ always() }}