-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add common GitHub Actions recipes #206
base: main
Are you sure you want to change the base?
Conversation
This is an attempt to codify some common GitHub Actions recipes that we can use, probably with tweaks, across multiple repositories. It is based in part on work that the Dev Services team did to add GitHub Actions to [teachers-digital-platform](cfpb/curriculum-review-tool#383) and previously to cfgov-refresh
071d13f
to
88b9db0
Compare
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.
One typo noted.
Co-authored-by: william higgins <higs4281@users.noreply.github.com>
guides/github-actions.md
Outdated
|
||
## Running front-end unit tests | ||
|
||
```yml |
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.
Instead of having the actions duplicated here, maybe link to the actual file so we don't have to keep this in sync?
Same for the other snippets in this file.
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.
Oh nevermind, I see you say these will likely be tweaked and are for use across projects, not just cfgov-refresh.
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.
Yeah... the intention is to provide a starting point for creating actions... I was looking at the ones we have so far, and there are little differences, not huge, but enough that I think they'll need to be tweaked for each repo.
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.
This looks great, overall. There are a couple more typos, and one suggestion to add: It would be nice to offer suggested filenames, as those affect the name of the checks when reported on PRs.
Co-authored-by: Scott Cranfill <scott.cranfill@cfpb.gov>
Co-authored-by: Scott Cranfill <scott.cranfill@cfpb.gov>
Workflow templates just announced: https://github.blog/changelog/2020-06-23-github-actions-workflow-templates/ |
Naturally. |
@Scotchester I've updated this PR (and opened cfpb/.github#1) based on the GitHub Actions workflow templates. It now has screenshots of how to use the templates to hopefully cfpb/.github#1 will provide, as well as the recipes for uploading a wheel file to GitHub and the kind of git checkout that's required for setuptools-git-version (which the templates provide, but I think is worth calling out here separately too). |
- name: Build the Python packages | ||
id: build | ||
run: | | ||
python setup.py sdist bdist_wheel |
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.
Could we document using the Python cache to speed up the build? I don't think we're actually using this yet on cfgov-refresh and its associated packages, but it'd be nice to do so.
We do have an example of using Node and Ruby caches on a design-system action.
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.
Yeah, I'm interested in this idea, too.
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.
Oh my goodness yes. I'll play with this and then get it integrated.
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} |
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.
Is it worth noting in this example that it depends on the on: release
trigger, which was left out of the sample code block?
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.
Yes indeed.
Co-authored-by: Scott Cranfill <scott.cranfill@cfpb.gov>
This is an attempt to codify some common GitHub Actions recipes that we can use, probably with tweaks, across multiple repositories.
It is based in part on work that the Dev Services team did to add GitHub Actions to teachers-digital-platform and previously to cfgov-refresh