Skip to content

Commit

Permalink
v1.5.3; dependancy and package manager fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amckenna41 committed Mar 9, 2024
1 parent a3f4c18 commit f9429ac
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ name: Deploy to PyPI 📦
on:
workflow_run:
workflows: [Deploy to TestPyPI 📦]
types:
- completed
types: [completed]

# allow for workflow to be manually initiated from the Actions tab
workflow_dispatch:

# build and deploy to PyPI server if test workflow was successful or manual trigger was selected
jobs:
build:
test_success:
name: Deploy to PyPI 📦
runs-on: ubuntu-latest # platform: [ubuntu-latest, macos-latest, windows-latest]
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
python-version: [3.9] #deploying using one Python version on 1 runner
steps:
- uses: actions/checkout@v3

# build distribution package using poetry tool and upload to the PYPi server via custom github action
- name: Build and publish to PyPI
uses: JRubics/poetry-publish@v2.0
Expand All @@ -37,4 +37,12 @@ jobs:
run: |
pip install iso3166_2 --upgrade
echo -e "import iso3166_2 as iso3166_2" | python3
echo "iso3166_2 successfully installed"
echo "iso3166_2 successfully installed"
# test workflow was not successful so package not deployed to PyPI server
test_failure:
name: Test workflow failure
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo "Test workflow failure, package not deployed to PyPI server"
18 changes: 13 additions & 5 deletions .github/workflows/deploy_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ name: Deploy to TestPyPI 📦
on:
workflow_run:
workflows: ["Building and Testing"]
types:
- completed
types: [completed]

# allow for workflow to be manually initiated from the Actions tab
workflow_dispatch:

#build and deploy to Test PyPI server
# build and deploy to Test PyPI server if test workflow was successful or manual trigger was selected
jobs:
build:
test_success:
name: Deploy to TestPyPI 📦
runs-on: ubuntu-latest # platform: [ubuntu-latest, macos-latest, windows-latest]
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
python-version: [3.9] #deploying using one Python version on 1 runner
Expand All @@ -39,4 +39,12 @@ jobs:
- name: Install iso3166_2 from Test PyPI
run: |
pip install -i https://test.pypi.org/simple/ iso3166_2 --upgrade
echo "iso3166_2 successfully installed"
echo "iso3166_2 successfully installed"
# test workflow was not successful so package not deployed to Test PyPI or PyPI
test_failure:
name: Test workflow failure
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo "Test workflow failure, package not deployed to Test PyPI server"
2 changes: 1 addition & 1 deletion tests/test_get_iso3166_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import unittest
unittest.TestLoader.sortTestMethodsUsing = None

@unittest.skip("")
# @unittest.skip("")
class Get_ISO3166_2_Tests(unittest.TestCase):
"""
Test suite for testing get_iso3166_2.py script that pulls all the ISO 3166-2
Expand Down
2 changes: 1 addition & 1 deletion tests/test_iso3166_2_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from bs4 import BeautifulSoup
import unittest
unittest.TestLoader.sortTestMethodsUsing = None
@unittest.skip("")
# @unittest.skip("")
class ISO3166_2_API_Tests(unittest.TestCase):
"""
Test suite for testing ISO 3166-2 api created to accompany the iso3166-2 Python software package.
Expand Down

0 comments on commit f9429ac

Please sign in to comment.