]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
repair pipelines for 2.7
authorFederico Caselli <cfederico87@gmail.com>
Thu, 6 Jul 2023 20:49:05 +0000 (22:49 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Thu, 6 Jul 2023 22:15:30 +0000 (00:15 +0200)
Change-Id: Id4766704e4f7e4da2495ebdd8f44e4618a695df5

.github/workflows/create-wheels.yaml
.github/workflows/run-test.yaml

index d88da9038c2eb54de223257d4a382f80446b5f03..a00465d9fce8c06145cba9e119ffd8a0137c268f 100644 (file)
@@ -23,7 +23,6 @@ jobs:
           - "windows-latest"
           - "macos-latest"
         python-version:
-          - "2.7"
           - "3.6"
           - "3.7"
           - "3.8"
@@ -249,12 +248,14 @@ jobs:
           pip-wheel-args: "-w ./dist --no-use-pep517 -v --no-deps"
 
       - name: Set up Python
+        if: ${{ matrix.python-version != 'cp27-cp27m' && matrix.python-version != 'cp27-cp27mu' }}
         uses: actions/setup-python@v4
         with:
           python-version: ${{ steps.linux-py-version.outputs.python-version }}
           architecture: ${{ matrix.architecture }}
 
       - name: Check created wheel
+        if: ${{ matrix.python-version != 'cp27-cp27m' && matrix.python-version != 'cp27-cp27mu' }}
         # check that the wheel is compatible with the current installation.
         # If it is then does:
         # - install the created wheel without using the pypi index
@@ -273,6 +274,22 @@ jobs:
             echo Not compatible. Skipping install.
           fi
 
+      - name: Check created wheel 27
+        if: ${{ matrix.python-version == 'cp27-cp27m' || matrix.python-version == 'cp27-cp27mu' }}
+        # check that the wheel is compatible with the current installation.
+        # - runs the tests
+        uses: docker://quay.io/pypa/manylinux1_x86_64
+        with:
+          args: |
+            bash -c "
+            export PATH=/opt/python/${{ matrix.python-version }}/bin:$PATH &&
+            python --version &&
+            pip install \"greenlet<2\" \"importlib-metadata;python_version<'3.8'\" &&
+            pip install -f dist --no-index sqlalchemy &&
+            python -c 'from sqlalchemy.util import has_compiled_ext; assert has_compiled_ext()' &&
+            pip install pytest pytest-xdist ${{ matrix.extra-requires }} &&
+            pytest -n2 -q test --nomemory --notimingintensive"
+
       - name: Upload wheels to release
         # upload the generated wheels to the github release
         uses: sqlalchemyorg/upload-release-assets@sa
index a2d728263719d460fec2d5b20062b20b5882bd07..c85f5043d32296b34df6d4f37f1221769a634bbd 100644 (file)
@@ -28,7 +28,6 @@ jobs:
       matrix:
         os:
           - "ubuntu-latest"
-          - "ubuntu-20.04"
           - "windows-latest"
           - "macos-latest"
         python-version:
@@ -109,6 +108,40 @@ jobs:
       - name: Run tests
         run: tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }}
 
+  run-test-py27:
+    name: py27-${{ matrix.build-type }}-${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os:
+          - "ubuntu-latest"
+        python-version:
+          - cp27-cp27m
+          - cp27-cp27mu
+        build-type:
+          - "cext"
+          - "nocext"
+
+      fail-fast: false
+
+    steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+
+      - name: Run tests
+        uses: docker://quay.io/pypa/manylinux1_x86_64
+        with:
+          args: |
+            bash -c "
+            export PATH=/opt/python/${{ matrix.python-version }}/bin:$PATH &&
+            sed -i 's/greenlet/greenlet<2,/g' setup.cfg && 
+            python --version &&
+            python -m pip install --upgrade pip &&
+            pip install --upgrade tox setuptools &&
+            pip list &&
+            tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }}
+            "
+
   run-test-arm64:
     name: arm64-${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.os }}
     runs-on: ${{ matrix.os }}
@@ -116,7 +149,6 @@ jobs:
       matrix:
         os:
           - "ubuntu-latest"
-          - "ubuntu-20.04"
         python-version:
           - cp36-cp36m
           - cp37-cp37m