diff --git a/.github/workflows/27acceptance.yml b/.github/workflows/27acceptance.yml new file mode 100644 index 0000000..99b3220 --- /dev/null +++ b/.github/workflows/27acceptance.yml @@ -0,0 +1,24 @@ +name: 2.7 Acceptance CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + container: + image: python:2.7.18-buster + + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install mock unittest2 + + - name: Run Tests + run: | + python -m test diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml new file mode 100644 index 0000000..1074295 --- /dev/null +++ b/.github/workflows/acceptance.yml @@ -0,0 +1,31 @@ +name: Acceptance CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install mock + + - name: Run Tests + run: | + python -m unittest test.py diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..7f407bd --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,31 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME_PUBLIC }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_PUBLIC }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b47a98b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -dist: xenial -language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - -install: - - pip install mock coverage flake8 -script: - - coverage run test.py - - coverage report --show-missing - - flake8 ggeocoder.py diff --git a/test.py b/test.py index facc62d..a08105d 100755 --- a/test.py +++ b/test.py @@ -89,6 +89,7 @@ "status" : "OK" }""" + class GeocodeErrorTests(unittest.TestCase): def test_geocode_error_string_representation_contains_error_and_query(self):