Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update coveralls-python Configuration in GitHub Actions Workflow #71

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Apr 5, 2021

🗣 Description

This PR updates the configuration for coveralls-python in our GitHub Actions workflow to use the automatically created GITHUB_TOKEN secret instead of a per-repo COVERALLS_REPO_TOKEN we have used previously to close #70. It also tags each individual test job (one per Python version supported) at https://coveralls.io by changing our configuration to reflect that the job runs in parallel.

💭 Motivation and context

@dav3r ran into an issue with how coveralls-python is run in our GitHub Actions workflow in cisagov/gophish-tools#29. He determined the fix was the update the configuration to what was described in the documentation. I believe we have run afoul of changes in coveralls-python v3 to the order in which configurations are processed.

🧪 Testing

Automated tests run without issue, and I confirmed both that coverage reports were uploaded and that the tagging for parallel tasks is working.

✅ Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

coveralls-python has better integration with running in GitHub Actions now, so
we can use the automatically generated GITHUB_TOKEN secret instead of manually
setting a COVERALLS_REPO_TOKEN secret for each repository.
@mcdonnnj mcdonnnj added bug This issue or pull request addresses broken functionality improvement This issue or pull request will add or improve functionality, maintainability, or ease of use labels Apr 5, 2021
@mcdonnnj mcdonnnj added this to In progress in Skeleton Maintenance via automation Apr 5, 2021
@mcdonnnj mcdonnnj self-assigned this Apr 5, 2021
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after a minor change. ⚙️
Please also see my one question.

Comment on lines 78 to 79
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: "py${{ matrix.python-version }}"
COVERALLS_PARALLEL: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort environment variables alphabetically:

Suggested change
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: "py${{ matrix.python-version }}"
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "py${{ matrix.python-version }}"
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml Show resolved Hide resolved
@mcdonnnj mcdonnnj force-pushed the improvement/update_gha_coveralls_configuration branch from 7f57cc0 to 30a1c14 Compare April 5, 2021 14:50
We already ran our tests in parallel for each major version of Python a project
supports. This change should better differentiate each test job run in the
reports submitted.
Skeleton Maintenance automation moved this from In progress to Reviewer approved Apr 5, 2021
@mcdonnnj mcdonnnj added the blocked This issue or pull request is awaiting the outcome of another issue or pull request label Apr 6, 2021
Copy link
Contributor

@hillaryj hillaryj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏆

@mcdonnnj mcdonnnj merged commit b85e1b8 into develop Apr 15, 2021
Skeleton Maintenance automation moved this from Reviewer approved to Done Apr 15, 2021
@mcdonnnj mcdonnnj deleted the improvement/update_gha_coveralls_configuration branch April 15, 2021 17:47
cisagovbot pushed a commit that referenced this pull request Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request is awaiting the outcome of another issue or pull request bug This issue or pull request addresses broken functionality improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Development

Successfully merging this pull request may close these issues.

Update build GHA Workflow for Newer coveralls-python Configurations
4 participants