From 9d9d73eb5b0d774e66046be2db384765ba5c80bb Mon Sep 17 00:00:00 2001 From: William Kimball <30981667+wwkimball@users.noreply.github.com> Date: Sun, 11 Feb 2024 14:07:12 -0600 Subject: [PATCH] Split Coveralls.IO publication to resolve throttling --- .github/workflows/build.yml | 10 ++---- .../workflows/python-publish-to-coveralls.yml | 34 +++++++++++++++++++ .../workflows/python-publish-to-prod-pypi.yml | 3 +- .../workflows/python-publish-to-test-pypi.yml | 3 +- 4 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/python-publish-to-coveralls.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6267836..b72554c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,6 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# This workflow will install dependencies, EYAML (from Ruby), and run all tests +# and linting tools with every supported version of Python. +# @see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: build @@ -46,8 +47,3 @@ jobs: - name: Unit Test with pytest run: | pytest --verbose --cov=yamlpath --cov-report=term-missing --cov-fail-under=100 --script-launch-mode=subprocess tests - - name: Publish coveralls Report - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - coveralls --service=github diff --git a/.github/workflows/python-publish-to-coveralls.yml b/.github/workflows/python-publish-to-coveralls.yml new file mode 100644 index 0000000..7c2aac7 --- /dev/null +++ b/.github/workflows/python-publish-to-coveralls.yml @@ -0,0 +1,34 @@ +# This workflow runs the full sweep of tests for the yamlpath package and publishes the coverage report to coveralls.io +name: build + +on: + push: + branches: [ master, development ] + pull_request: + branches: [ master, development ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + - name: Set Environment Variables + run: | + echo "${HOME}/.local/share/gem/ruby/3.0.0/bin" >> $GITHUB_PATH + - name: Install dependencies + run: | + gem install --user-install hiera-eyaml + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools + python -m pip install --upgrade pytest pytest-cov pytest-console-scripts coveralls + python -m pip install --editable . + - name: Unit Test with pytest + run: | + pytest --verbose --cov=yamlpath --cov-report=term-missing --cov-fail-under=100 --script-launch-mode=subprocess tests + - name: Publish coveralls Report + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coveralls --service=github diff --git a/.github/workflows/python-publish-to-prod-pypi.yml b/.github/workflows/python-publish-to-prod-pypi.yml index 9c3d168..0b603d1 100644 --- a/.github/workflows/python-publish-to-prod-pypi.yml +++ b/.github/workflows/python-publish-to-prod-pypi.yml @@ -1,4 +1,5 @@ -# SOURCE: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ +# Manually publish to production PyPI +# @ssee: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ name: Upload PRODUCTION Python Package on: diff --git a/.github/workflows/python-publish-to-test-pypi.yml b/.github/workflows/python-publish-to-test-pypi.yml index c95ced7..7026940 100644 --- a/.github/workflows/python-publish-to-test-pypi.yml +++ b/.github/workflows/python-publish-to-test-pypi.yml @@ -1,4 +1,5 @@ -# SOURCE: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ +# Test publishing to PyPI. +# @see: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ name: Upload Python TEST Package on: