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

Better integration with upcoming GitHub Actions extension #54

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

abravalheri
Copy link
Contributor

In pyscaffold/pyscaffold#619 we are proposing a new --github-actions extension to PyScaffold that will add a workflow that already contains the publish action1.

Ideally we want to avoid --github-actions and --custom-extension to created repeated CI actions.
Moreover, if the user wants to use --github-actions or --gitlab (or --bitbucket-ci, etc), it is highly unlikely that --cirrus should automatically be added to the mix.

In this PR, I attempt to postpone the automatic inclusion of --cirrus, and prevent it from happening entirely if --github-actions or --gitlab have been explicitly passed.

Footnotes

  1. The reason why the same workflow file contains both the tests and the publish job is because GitHub currently has no easy way of expressing dependencies between different workflows. This way unless everything is in the same file there is no way of preventing a release to proceed when the tests fail.

"""Opportunistically add CirrusCI config if no other CI service was added."""

uses_github_actions = struct.get(".github", {}).get("workflows") is not None
other_ci_files = [".gitlab-ci.yml"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit add-hoc, although completely fine if we just want to consider extensions that we have completely control over (no 3rd-party).

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5313065817210880

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.8%) to 94.04%

Totals Coverage Status
Change from base Build 5930318317223936: 0.8%
Covered Lines: 114
Relevant Lines: 118

💛 - Coveralls

@abravalheri abravalheri marked this pull request as ready for review February 28, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants