⬆️ Bump urllib3 from 1.26.9 to 2.0.7 #183
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: Publish python distribution to PyPI | |
on: push | |
jobs: | |
build-and-publish-test: | |
name: Build and publish python distribution to test PyPI | |
runs-on: ubuntu-18.04 | |
if: "!(startsWith(github.event.ref, 'refs/tags') || github.ref == 'refs/heads/master')" | |
continue-on-error: true | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Setup pip | |
run: python -m pip install pip==21.0.1 | |
- name: Build and publish to pypi | |
uses: JRubics/[email protected] | |
with: | |
python_version: '3.8.10' | |
poetry_version: "==1.1.4" | |
repository_name: 'pytest_mock_generator' | |
repository_url: 'https://test.pypi.org/legacy/' | |
pypi_token: ${{ secrets.test_pypi_password }} | |
continue-on-error: true | |
- name: Sleep to allow pypi index to update with the new version | |
run: sleep 5m | |
- name: Install poetry | |
run: make poetry-download | |
- name: Cleanup | |
run: | | |
rm -r pytest_mock_generator | |
pip uninstall pytest-mock-generator | |
- name: Perform System tests | |
run: | | |
poetry export --dev --without-hashes -f requirements.txt --output test-requirements.txt | |
pip install -r test-requirements.txt | |
pip install -i https://test.pypi.org/simple/ pytest-mock-generator | |
python -m pytest -vvv -k "test_public_api" | |
export INSTALLED=`pip freeze | grep pytest-mock-generator` | |
export EXPECTED=`poetry version --short` | |
if [ "${INSTALLED:23}" != "$EXPECTED" ]; then exit 1; fi | |
build-and-publish-production: | |
name: Build and publish python distribution to production PyPI | |
runs-on: ubuntu-18.04 | |
if: startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Setup pip | |
run: python -m pip install pip==21.0.1 | |
- name: Build and publish to pypi | |
uses: JRubics/[email protected] | |
with: | |
python_version: '3.8.10' | |
poetry_version: "==1.1.4" | |
repository_name: 'pytest_mock_generator' | |
pypi_token: ${{ secrets.prod_pypi_password }} | |
continue-on-error: true | |
- name: Sleep to allow pypi index to update with the new version | |
run: sleep 5m | |
- name: Install poetry | |
run: make poetry-download | |
- name: Cleanup | |
run: | | |
rm -r pytest_mock_generator | |
pip uninstall pytest-mock-generator | |
- name: Perform System tests | |
run: | | |
poetry export --dev --without-hashes -f requirements.txt --output test-requirements.txt | |
pip install -r test-requirements.txt | |
pip install pytest-mock-generator | |
python -m pytest -vvv -k "test_public_api" | |
export INSTALLED=`pip freeze | grep pytest-mock-generator` | |
export EXPECTED=`poetry version --short` | |
if [ "${INSTALLED:23}" != "$EXPECTED" ]; then exit 1; fi |