-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (42 loc) · 1.08 KB
/
test_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Run Tests & Deploy
on:
pull_request:
branches: [main, staging]
paths-ignore:
- 'README.md'
jobs:
tests:
runs-on: ubuntu-latest
if: github.ref_type == 'branch'
steps:
- uses: actions/checkout@v3
- name: Install
run: |
pip install -r dev_requirements.txt
shell: bash
#TODO: ADD TESTS
deploy_to_pypi:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' && github.actor != 'mindsdbadmin'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
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_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*
- name: Install latest version from pypi to see that all is working
run: |
sleep 90
pip install dbt-mindsdb