-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Kogan <[email protected]>
- Loading branch information
Showing
3 changed files
with
125 additions
and
55 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Publish python distribution to PyPI | ||
on: push | ||
|
||
jobs: | ||
build-and-publish-test: | ||
name: Build and publish python distribution to PyPI | ||
runs-on: ubuntu-18.04 | ||
continue-on-error: true | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/[email protected] | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
python_version: '3.7.1' | ||
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: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- 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: | | ||
python -m pip install pip==21.0.1 | ||
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 PyPI | ||
runs-on: ubuntu-18.04 | ||
if: startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/[email protected] | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
python_version: '3.7.1' | ||
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: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- 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: | | ||
python -m pip install pip==21.0.1 | ||
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "pytest-mock-generator" | ||
version = "0.1.0" | ||
version = "0.3.0" | ||
description = "A pytest fixture wrapper for https://pypi.org/project/mock-generator" | ||
readme = "README.md" | ||
authors = ["Peter Kogan <[email protected]>"] | ||
|