diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml new file mode 100644 index 0000000..eaf9206 --- /dev/null +++ b/.github/workflows/build-docs.yaml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Build docs + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest tox + + - name: Build docs + run: | + tox -e docs + + - name: GH Pages Deployment + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages # The branch the action should deploy to. + folder: ./docs/_build/html + clean: true # Automatically remove deleted files from the deploy branch diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..aee6f36 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test the library + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + + name: Python ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest tox + + - name: Test with tox + run: | + tox diff --git a/setup.cfg b/setup.cfg index a2e3d6d..090a845 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,7 +49,8 @@ package_dir = # For more information, check out https://semver.org/. install_requires = importlib-metadata; python_version<"3.8" - + requests + appdirs [options.packages.find] where = src diff --git a/src/pygobbler/start_gobbler.py b/src/pygobbler/start_gobbler.py index ec2fab7..621e00e 100644 --- a/src/pygobbler/start_gobbler.py +++ b/src/pygobbler/start_gobbler.py @@ -119,7 +119,7 @@ def _initialize_gobbler_process(exe: str, staging: Optional[str], registry: Opti global test_process import subprocess - test_process = subprocess.Popen([ exe, "-admin", os.getlogin(), "-registry", registry, "-staging", staging, "-port", str(port) ], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + test_process = subprocess.Popen([ exe, "-admin", os.getlogin(), "-registry", registry, "-staging", staging, "-port", str(port) ]) import atexit atexit.register(stop_gobbler) return