Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Build and Test installation #51

Build and Test installation

Build and Test installation #51

Workflow file for this run

name: Pre Release CI
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build & Test on ${{ matrix.os }}-py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, '3.10', 3.11]
defaults:
run:
shell: bash
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: Install the wheel
run: |
pip install dist/pinecone_canopy*.whl
- name: Create dev requirements file
run: |
poetry export -f requirements.txt --without-hashes --only dev -o only-dev.txt
- name: Install dev requirements
run: |
pip install -r only-dev.txt
- name: Run tests
run: pytest --html=report.html --self-contained-html tests/unit
- name: Upload pytest reports
if: always()
uses: actions/upload-artifact@v3
with:
name: pytest-report-${{ matrix.os }}-py${{ matrix.python-version }}
path: .pytest_cache