Added credentials #8
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: Test & Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Setup environment, python and requirements | |
run: | | |
mkdir data | |
echo '${{ secrets.CREDS_TEST }}' > data/credentials.json | |
echo "${{ secrets.ENV_TEST }}" > .env | |
pip install setuptools wheel twine | |
pip install -r requirements.txt | |
- name: Test with unittest | |
run: | | |
cd gsheet_pandas | |
python -m unittest tests.py | |
cd .. | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Setup environment, python and requirements | |
run: | | |
echo "${{ secrets.ENV_TEST }}" > .env | |
pip install setuptools wheel twine | |
python setup.py install | |
- name: Build and upload | |
run: | | |
python setup.py sdist | |
python setup.py bdist_wheel --universal | |
python -m twine upload --skip-existing dist/* -u ${{ secrets.TWINE_LOGIN }} -p ${{ secrets.TWINE_PASSWORD }} |