@@ -97,32 +97,76 @@ jobs:
9797 name : sdist
9898 path : dist/*.tar.gz
9999
100+ test_sdist :
101+ name : Test source distribution package
102+ needs : [build_sdist]
103+ strategy :
104+ matrix :
105+ os :
106+ - macos-13
107+ - macos-14
108+ - windows-2022
109+ - ubuntu-22.04
110+ - ubuntu-24.04-arm
111+ python : ["3.9", "3.10", "3.11", "3.12", "3.13"]
112+ runs-on : ${{ matrix.os }}
113+ steps :
114+ - name : Set up Python ${{ matrix.python }}
115+ uses : actions/setup-python@v5
116+ with :
117+ python-version : ${{ matrix.python }}
118+
119+ - name : Download sdist artifact
120+ uses : actions/download-artifact@v4
121+ with :
122+ name : sdist
123+ path : dist
124+
125+ - name : Install sdist artifact
126+ run : pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }}
127+
128+ - uses : actions/checkout@v4
129+
130+ - name : Install test dependencies
131+ run : pip install pytest pytest-rerunfailures hypothesis psutil pyarrow
132+
133+ - name : Run tests
134+ shell : bash
135+ run : |
136+ PROJECT_CWD=$PWD
137+ rm tiledb/__init__.py
138+ cd ..
139+ pytest -vv --showlocals $PROJECT_CWD
140+
141+ - name : " Re-run tests without pandas"
142+ run : |
143+ pip uninstall -y pandas
144+ pytest -vv --showlocals $PROJECT_CWD
145+
146+ upload_pypi :
147+ needs : [build_wheels, test_sdist]
148+ runs-on : ubuntu-latest
149+ environment : pypi
150+ permissions :
151+ id-token : write
152+ outputs :
153+ package_version : ${{ steps.get_package_version.outputs.package_version }}
154+ steps :
155+ - uses : actions/download-artifact@v4
156+ with :
157+ path : dist
158+ merge-multiple : true
100159
160+ - id : get_package_version
161+ run : |
162+ echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"
163+
164+ - name : Upload to test-pypi
165+ if : inputs.test_pypi
166+ uses : pypa/gh-action-pypi-publish@release/v1
167+ with :
168+ repository-url : https://test.pypi.org/legacy/
101169
102- # upload_pypi:
103- # needs: [build_wheels, test_sdist]
104- # runs-on: ubuntu-latest
105- # environment: pypi
106- # permissions:
107- # id-token: write
108- # outputs:
109- # package_version: ${{ steps.get_package_version.outputs.package_version }}
110- # steps:
111- # - uses: actions/download-artifact@v4
112- # with:
113- # path: dist
114- # merge-multiple: true
115-
116- # - id: get_package_version
117- # run: |
118- # echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"
119-
120- # - name: Upload to test-pypi
121- # if: inputs.test_pypi
122- # uses: pypa/gh-action-pypi-publish@release/v1
123- # with:
124- # repository-url: https://test.pypi.org/legacy/
125-
126- # - name: Upload to pypi
127- # if: startsWith(github.ref, 'refs/tags/')
128- # uses: pypa/gh-action-pypi-publish@release/v1
170+ - name : Upload to pypi
171+ if : startsWith(github.ref, 'refs/tags/')
172+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments