-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 Makefile, transition from Travis CI #1911
Conversation
FYI, the Action won't run since it's coming from a fork. I originally pushed the workflow without limiting the |
.github/workflows/ci-cd.yml
Outdated
pull_request: | ||
push: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also include branch main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? This repo does not have a main
branch and the default branch is master
.
clean: | ||
rm -rf ${p39dir} troposphere.egg-info | ||
|
||
lint: lint-flake8 ## run all linters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also run lint-black
and lint-isort
? Or the comment should be adjusted.
right now, only configured to forward to the lint-flake8 target as it is the only thing being run as a check currently
I don't think this restriction is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this restriction is necessary
If I were to add the other targets here before the codebase is updated to pass both black and isort checks, the action I added will always fail. This target is being used as the main linting entry point for the workflow and to provide an entry point for local linting.
I plan to have a few follow-up PRs to this one that will address this concern by pairing it with updates to the code to pass these checks. I this them out, for now, to cut reduce the diffs for an easier review.
👍 for Travis CI → GitHub Actions But instead of cementing the make approach, I'd prefer using tox more. |
Co-authored-by: Michael K. <[email protected]>
@michael-k - I tend to avoid tox as it does not play nice with a lot of other tools. Maybe there is a middle ground between using tox for its ability to handle running across different versions of python and makes ability to provide a low-effort set of commands to work within a project. I can play around with it a bit or, it may be better suited for a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We can tweak per comments in follow up PR's.
Thanks! |
Summary
This PR is a follow up to my comment in #1904 where I volunteered to do some maintenance in the project and implement some QoL changes.
What Changed
Added
help
- print help dialog to the terminal that describes all the available targetsfix-black
- while not implemented in the project,test
had contained a call ofblack --check
. this target would server to implement the changes highlighted by black.fix-isort
- while not implemented in the project,test
had contained a call ofisort --check
. . this target would server to implement the changes highlighted by isort.lint
- run all linters (right now, only configured to forward to thelint-flake8
target as it is the only thing being run as a check currently). allows easy parody between what the GitHub Action is running and what can be run locally.lint-black
- split out fromtest
, this uses black to check project code.lint-flake8
- run the flake8 commands as they were in.travis.yml
.lint-isort
- split out fromtest
, this uses isort to check project code.Changed
test
Makefile target no longer runs black and isort. it will only run tests as was defined in.travis.yml
to allow easy parody between what the GitHub Action is running and what can be run locally.Removed
.travis.yml
as it will no longer be needed