-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Build empty cookiecutters and run lint task during CI #1410
Conversation
Thanks for the PR @flexponsive - looks like we've got some engineers assigned as reviewers who will get back to you likely sometime next week! |
Hey @flexponsive! Looks like flake8 is complaining. Let me know when this is ready to be reviewed 🙂 |
Codecov Report
@@ Coverage Diff @@
## main #1410 +/- ##
=======================================
Coverage 85.39% 85.39%
=======================================
Files 54 54
Lines 4737 4737
Branches 808 808
=======================================
Hits 4045 4045
Misses 501 501
Partials 191 191 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
a066f3f
to
42bf356
Compare
for more information, see https://pre-commit.ci
@edgarrmondragon I have updated the PR and description. Github does not show the results from the E2E-Tests of cookiecutters here in the PR, they are available here:
|
@flexponsive - First of all - thank you for creating this PR! What do you think of adding a step to upload the generated projects using GitHub artifacts, if not already doing so? https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3
with:
name: my-artifact
path: path/to/artifact/ # or path/to/artifact |
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.
Hey @flexponsive. A few comments and suggestions. The bash script is good for an initial iteration of this but we should probably (not necessarily in this PR) port it to Nox since that's where we centralize dev tasks.
...}/{{cookiecutter.library_name}}/{%if 'REST' == cookiecutter.stream_type %}client.py{%endif%}
Outdated
Show resolved
Hide resolved
Co-authored-by: Edgar R. M. <edgarrm358@gmail.com>
a8a1609
to
dfb3af1
Compare
dfb3af1
to
59bc837
Compare
Thank you for the fast feedback and improvements to the PR! @edgarrmondragon I accepted the suggestions and believe the issues you raised are fixed. I agree that it would be a good idea in the future to migrate from the bash script to tox but probably outside the scope of this PR. @aaronsteers build artifact upload has been added too Sample run: https://github.com/flexponsive/meltano-sdk/actions/runs/4172051621 |
Nice! Thank you! |
Reviewing now... |
2b569b5
to
958f769
Compare
Thanks @flexponsive! |
Related to #993
Feature Scope
Adds a Github Action to run basic end-to-end tests for the cookiecutters.
It builds empty cookiecutters from replay files, install its dependencies with poetry and runs some auto fixes on the generated code (flake8 & co). Finally, it runs the lint task as specified by the cookiecutter against itself. Additionally, a script which creates and lints in one step for developer convenience while working on cookiecutter templates.
This PR also includes a small shell script to build, install and lint a cookiecutter with a single command.
This PR also includes a few fixes (method signatures #1224, docstrings etc.) demanded by the linter for the case of a tap with REST stream type and API Key authentication method.
Relationship to
test_cookiecutter.py
The SDK test suite already includes tests for building cookiecutters in
test_cookiecutter.py
, which runs flake8 and mypy. However, it does not use the same configuration for these tools as the template contains and also does not install dependencies with poetry so some errors are not picked up (e.g. method signatures mismatch). End-to-end tests can be a useful addition here.Suggested GIthub Action config
Run the
cookiecutter-e2e
action only when cookiecutter files are changed; optionally on a regular schedule.📚 Documentation preview 📚: https://meltano-sdk--1410.org.readthedocs.build/en/1410/