This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
[CI] Only run mypy on src #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre Release CI | ||
on: | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs:git | ||
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_resin*.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 | ||