Skip to content

feature: added max of retries for protect APIServer #79

feature: added max of retries for protect APIServer

feature: added max of retries for protect APIServer #79

Workflow file for this run

name: Tests and Pre-build
on:
pull_request:
branches:
- main
# For manual triggers
workflow_dispatch:
jobs:
test:
if: github.actor != 'actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup tests
run: |
pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.create false
poetry install
- name: Run tests & CodeCov
run: |
coverage run -m pytest
coverage report
coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
pre_build:
if: github.actor != 'actions[bot]'
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Poetry Setup
run: |
pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.create false
poetry install
- name: Generate and push Tag
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git push
git tag -f $(poetry version -s)
git push -f origin --tags
- name: Build package
run: poetry build
- name: Repository Setup
run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
# poetry config pypi-token.test-pypi ${{ secrets.TEST_PYPI_TOKEN }}
# poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Publish package to TestPyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_TOKEN }}
run: poetry publish -r test-pypi -u __token__ --password $POETRY_PYPI_TOKEN_PYPI
environment:
name: Development
url: https://test.pypi.org/project/api-to-dataframe/