diff --git a/.github/workflows/pre-release-CI.yml b/.github/workflows/pre-release-CI.yml index c2bbc4f9..6f630ee2 100644 --- a/.github/workflows/pre-release-CI.yml +++ b/.github/workflows/pre-release-CI.yml @@ -8,8 +8,40 @@ concurrency: cancel-in-progress: true jobs: + build: + name: Build python${{ matrix.python-version }} + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9, '3.10', 3.11] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + + - name: Build wheel + run: | + poetry build + + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels-py${{ matrix.python-version }} + path: ./dist/ + + build-and-test: - name: Build & Test on ${{ matrix.os }}-py${{ matrix.python-version }} + name: Test on ${{ matrix.os }}-py${{ matrix.python-version }} + needs: build runs-on: ${{ matrix.os }} strategy: matrix: @@ -31,27 +63,29 @@ jobs: uses: snok/install-poetry@v1 with: version: 1.3.2 - virtualenvs-create: false + virtualenvs-create: true + virtualenvs-in-project: true installer-parallel: true - - name: Build wheel - run: | - poetry build + - name: Download wheels + uses: actions/download-artifact@v2 + with: + name: wheels-py${{ matrix.python-version }} + path: ./dist/ - name: Install the wheel run: | + source $VENV pip install dist/pinecone_canopy*.whl - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels-${{ matrix.os }}-py${{ matrix.python-version }} - path: ./dist/ - - name: Install dev dependencies run: | poetry install --no-root --only dev --no-interaction + - name: Debug print canopy + run: | + python -c "import canopy; print(canopy.__file__)" + - name: Run unit tests run: pytest --html=report.html --self-contained-html tests/unit