package-for-testing-gh-actions


Namepackage-for-testing-gh-actions JSON
Version 0.1.7 PyPI version JSON
download
home_pageNone
SummaryA sample Python project
upload_time2025-01-07 23:52:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Network Services Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords sample setuptools development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gh-actions-deliver-python-package

Custom GitHub Action to deliver a python package to a pypi repository ([test.]pypi.org, or pypi.uoregon.edu).

## GitHub Self-Hosted Runner Requirements

- python (3.11 default)
- [twine](https://pypi.org/project/twine/)
- [build](https://pypi.org/project/build/)


## Examples

Below are examples for testing and delivering python packages to the various supported package indexes.

### Example: Workflow for Publishing to pypi.uoregon.edu

1. Follow instructions to [Deploy to pypi.uoregon.edu (confluence)](https://confluence.uoregon.edu/x/ag5aGw).
    * NOTE: This example assumes you are using our default SSH Key pair found in keepass: "General -> PKI Keys -> pypi.uoregon.edu"
    * That default key pair is saved as [a Secret named `PYPI_UOREGON_EDU_SSH_KEY` in Network-Services GitHub Organization](https://is-github.uoregon.edu/organizations/Network-Services/settings/secrets/actions)
2. Use workflow below to test and publish your python package at [pypi.uoregon.edu](https://pypi.uoregon.edu)

```yml
on:
  push:

jobs:
  test:
    runs-on:
      - python
      - self-hosted
    steps:
      -
        uses: actions/checkout@v4
      -
        name: Run automated tests
        uses: Network-Services/gh-actions-test-python-package@main

  deliver:
    if: github.ref == 'refs/heads/main'
    needs: test
    runs-on:
      - python
      - twine
      - python-build
      - self-hosted
    steps:
      -
        uses: actions/checkout@v4
      -
        uses: Network-Services/gh-actions-deliver-python-package@main
        with:
          package-index: pypi.uoregon.edu
          pypi-ssh-key: ${{ secrets.PYPI_UOREGON_EDU_SSH_KEY }}
```


### Example: How to Publish to pypi.org using nsdevops account

### Example: How to Publish to pypi.org using personal account

1. Log in to your pypi.org account
2. Generate an [API Token](https://pypi.org/help/#apitoken).
3. Save as "PYPI_API_TOKEN" in your GitHub Repository.
4. Copy the following GitHub Workflow to "./github/workflows/test-and-deliver.yml":

```

```

# Appendix


## What is pypi.uoregon.edu?

Our Systems Automation Services team maintains a private Python Package Index (PyPI) service.

* Service URL https://pypi.uoregon.edu

> How to install packages from pypi.uoregon.edu:
> 
> * `pip install --extra-index-url https://pypi.uoregon.edu <your_package_name>`


# Development (for Maintainers of gh-actions-deliver-python-package)

Notes for future developers to maintain this solution.

## 'package-for-testing-gh-actions'

To test if this is a useful python package on this project, first set up a 'virtual environment' ('.venv):

```bash
python3 -m venv .venv && source .venv/bin/activate
```

Then install the package in editable mode

```
pip install -e .
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "package-for-testing-gh-actions",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "\"A. Great Maintainer\" <maintainer@example.com>",
    "keywords": "sample, setuptools, development",
    "author": null,
    "author_email": "\"A. Random Developer\" <author@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/09/7e/77764a8bf39d90a987d4335a3bef5168130e7777f25e7ef1a1d7080a0fe6/package_for_testing_gh_actions-0.1.7.tar.gz",
    "platform": null,
    "description": "# gh-actions-deliver-python-package\n\nCustom GitHub Action to deliver a python package to a pypi repository ([test.]pypi.org, or pypi.uoregon.edu).\n\n## GitHub Self-Hosted Runner Requirements\n\n- python (3.11 default)\n- [twine](https://pypi.org/project/twine/)\n- [build](https://pypi.org/project/build/)\n\n\n## Examples\n\nBelow are examples for testing and delivering python packages to the various supported package indexes.\n\n### Example: Workflow for Publishing to pypi.uoregon.edu\n\n1. Follow instructions to [Deploy to pypi.uoregon.edu (confluence)](https://confluence.uoregon.edu/x/ag5aGw).\n    * NOTE: This example assumes you are using our default SSH Key pair found in keepass: \"General -> PKI Keys -> pypi.uoregon.edu\"\n    * That default key pair is saved as [a Secret named `PYPI_UOREGON_EDU_SSH_KEY` in Network-Services GitHub Organization](https://is-github.uoregon.edu/organizations/Network-Services/settings/secrets/actions)\n2. Use workflow below to test and publish your python package at [pypi.uoregon.edu](https://pypi.uoregon.edu)\n\n```yml\non:\n  push:\n\njobs:\n  test:\n    runs-on:\n      - python\n      - self-hosted\n    steps:\n      -\n        uses: actions/checkout@v4\n      -\n        name: Run automated tests\n        uses: Network-Services/gh-actions-test-python-package@main\n\n  deliver:\n    if: github.ref == 'refs/heads/main'\n    needs: test\n    runs-on:\n      - python\n      - twine\n      - python-build\n      - self-hosted\n    steps:\n      -\n        uses: actions/checkout@v4\n      -\n        uses: Network-Services/gh-actions-deliver-python-package@main\n        with:\n          package-index: pypi.uoregon.edu\n          pypi-ssh-key: ${{ secrets.PYPI_UOREGON_EDU_SSH_KEY }}\n```\n\n\n### Example: How to Publish to pypi.org using nsdevops account\n\n### Example: How to Publish to pypi.org using personal account\n\n1. Log in to your pypi.org account\n2. Generate an [API Token](https://pypi.org/help/#apitoken).\n3. Save as \"PYPI_API_TOKEN\" in your GitHub Repository.\n4. Copy the following GitHub Workflow to \"./github/workflows/test-and-deliver.yml\":\n\n```\n\n```\n\n# Appendix\n\n\n## What is pypi.uoregon.edu?\n\nOur Systems Automation Services team maintains a private Python Package Index (PyPI) service.\n\n* Service URL https://pypi.uoregon.edu\n\n> How to install packages from pypi.uoregon.edu:\n> \n> * `pip install --extra-index-url https://pypi.uoregon.edu <your_package_name>`\n\n\n# Development (for Maintainers of gh-actions-deliver-python-package)\n\nNotes for future developers to maintain this solution.\n\n## 'package-for-testing-gh-actions'\n\nTo test if this is a useful python package on this project, first set up a 'virtual environment' ('.venv):\n\n```bash\npython3 -m venv .venv && source .venv/bin/activate\n```\n\nThen install the package in editable mode\n\n```\npip install -e .\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Network Services  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A sample Python project",
    "version": "0.1.7",
    "project_urls": {
        "Bug Reports": "https://github.com/pypa/sampleproject/issues",
        "Funding": "https://donate.pypi.org",
        "Homepage": "https://github.com/pypa/sampleproject",
        "Say Thanks!": "http://saythanks.io/to/example",
        "Source": "https://github.com/pypa/sampleproject/"
    },
    "split_keywords": [
        "sample",
        " setuptools",
        " development"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c0b0e859e174fe6e7e8c6fe94ab53d58faf37da7ecd3619b0610918fdb9baa9",
                "md5": "641d7823f0612ae4ee03a927b5aaf8b6",
                "sha256": "06c88482b2138ccdeec541bac1e7fc8b55da62dee18be784839b820517d6412c"
            },
            "downloads": -1,
            "filename": "package_for_testing_gh_actions-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "641d7823f0612ae4ee03a927b5aaf8b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4927,
            "upload_time": "2025-01-07T23:52:26",
            "upload_time_iso_8601": "2025-01-07T23:52:26.315950Z",
            "url": "https://files.pythonhosted.org/packages/6c/0b/0e859e174fe6e7e8c6fe94ab53d58faf37da7ecd3619b0610918fdb9baa9/package_for_testing_gh_actions-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "097e77764a8bf39d90a987d4335a3bef5168130e7777f25e7ef1a1d7080a0fe6",
                "md5": "3388b8f7e5e02f1cfe8f1d3df664936e",
                "sha256": "84bb9710d9055253933245d9fbb31798ce413a68ffa50b2b7047155df0ba66ed"
            },
            "downloads": -1,
            "filename": "package_for_testing_gh_actions-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3388b8f7e5e02f1cfe8f1d3df664936e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5859,
            "upload_time": "2025-01-07T23:52:27",
            "upload_time_iso_8601": "2025-01-07T23:52:27.458347Z",
            "url": "https://files.pythonhosted.org/packages/09/7e/77764a8bf39d90a987d4335a3bef5168130e7777f25e7ef1a1d7080a0fe6/package_for_testing_gh_actions-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-07 23:52:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pypa",
    "github_project": "sampleproject",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "package-for-testing-gh-actions"
}
        
Elapsed time: 0.78519s