update links #218
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: Mindsdb datasources workflow | |
on: | |
push: | |
pull_request: | |
branches: | |
- stable | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# , windows-latest, macos-latest -- | |
os: [ubuntu-latest] | |
python-version: [3.7,3.8] | |
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 | |
sudo apt-get install unixodbc unixodbc-dev libsasl2-dev | |
pip install -r optional_requirements_extra_data_sources.txt | |
pip install --no-cache-dir -e . | |
# Pyodbc stuff for snowflake | |
pip install pyodbc | |
wget https://sfc-repo.snowflakecomputing.com/odbc/linux/2.23.3/snowflake-odbc-2.23.3.x86_64.deb && yes | sudo dpkg -i snowflake-odbc-2.23.3.x86_64.deb | |
env: | |
CHECK_FOR_UPDATES: False | |
- name: Install dependencies Linux | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
pip install -r optional_requirements_cassandra.txt; | |
fi | |
shell: bash | |
env: | |
CHECK_FOR_UPDATES: False | |
- name: Install dependencies Windows | |
run: | | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html; | |
pip install -r optional_requirements_cassandra.txt; | |
fi | |
shell: bash | |
env: | |
CHECK_FOR_UPDATES: False | |
- name: Install dependencies OSX | |
run: | | |
if [ "$RUNNER_OS" == "macOS" ]; then | |
pip install -r optional_requirements_cassandra.txt; | |
brew install libomp; | |
fi | |
shell: bash | |
env: | |
CHECK_FOR_UPDATES: False | |
- name: Run unit tests | |
run: | | |
cd tests | |
python -m unittest discover . | |
cd .. | |
shell: bash | |
env: | |
CHECK_FOR_UPDATES: False | |
DATABASE_CREDENTIALS_STRINGIFIED_JSON: ${{ secrets.DATABASE_CREDENTIALS }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/stable' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
python setup.py sdist | |
twine upload dist/* |