Skip to content

Merge pull request #391 from mindsdb/staging #161

Merge pull request #391 from mindsdb/staging

Merge pull request #391 from mindsdb/staging #161

Workflow file for this run

name: Build and publish to pypi
on:
push:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install --no-cache-dir -e .[test]
- name: Run unit tests
run: pytest
shell: bash
source-dist:
needs: test
runs-on: windows-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: build wheel
run: |
pip install wheel
python setup.py bdist_wheel
- name: create source distribution
run: python setup.py sdist
- name: upload source distribution
run: |
pip install twine
twine upload dist/*