@@ -9,12 +9,12 @@ custom_title: GitHub Actions introduction
99
1010{% include toc.html %}
1111
12- The recommended CI for scientific Python projects is GitHub Actions (GHA),
13- although its predecessor Azure is also in heavy usage, and other popular
14- services (Travis, Appveyor, and Circle CI) may be found in a few packages. GHA
15- is preferred due to the flexible, extensible design and the tight integration
16- with the GitHub permissions model (and UI). Here is a guide in setting up a new
17- package with GHA.
12+ {% include rr.html id="GH100" %} The recommended CI for scientific Python
13+ projects is GitHub Actions (GHA), although its predecessor Azure is also in
14+ heavy usage, and other popular services (Travis, Appveyor, and Circle CI) may be
15+ found in a few packages. GHA is preferred due to the flexible, extensible design
16+ and the tight integration with the GitHub permissions model (and UI). Here is a
17+ guide in setting up a new package with GHA.
1818
1919GHA is made up of workflows which consist of actions. Here are some of the
2020workflows you will probably want in your package. These should be in a file
3636jobs :
3737` ` `
3838
39- This gives the workflow a nice name, and defines the conditions under which it
40- runs. This will run on all pull requests, or pushes to main. If you use a
41- develop branch, you probably will want to include that. You can also specify
42- specific branches for pull requests instead of running on all PRs (will run on
43- PRs targeting those branches only).
39+ This gives the workflow a nice name {% include rr.html id="GH101" %}, and
40+ defines the conditions under which it runs. This will run on all pull requests,
41+ or pushes to main. If you use a develop branch, you probably will want to
42+ include that. You can also specify specific branches for pull requests instead
43+ of running on all PRs (will run on PRs targeting those branches only).
4444
4545## Pre-commit
4646
@@ -124,9 +124,10 @@ you were building a final package.
124124
125125# # Updating
126126
127- If you use non-default actions in your repository (you will see some in the
128- following pages), then it's a good idea to keep them up to date. GitHub provided
129- a way to do this with dependabot. Just add the following file as
127+ {% include rr.html id="GH200" %} {% include rr.html id="GH210" %} If you use
128+ non-default actions in your repository (you will see some in the following
129+ pages), then it's a good idea to keep them up to date. GitHub provided a way to
130+ do this with dependabot. Just add the following file as
130131`.github/dependabot.yml` :
131132
132133` ` ` yaml
@@ -143,7 +144,8 @@ This will check to see if there are updates to the action weekly, and will make
143144a PR if there are updates, including the changelog and commit summary in the PR.
144145If you select a name like `v1`, this should only look for updates of the same
145146form (since April 2022) - there is no need to restrict updates for "moving tag"
146- updates anymore. You can also use SHA's and dependabot will respect that too.
147+ updates anymore {% include rr.html id="PY006" %}. You can also use SHA's and
148+ dependabot will respect that too.
147149
148150You can use this for other ecosystems too, including Python.
149151
@@ -253,7 +255,8 @@ permissions:
253255 id-token: write
254256` ` `
255257
256- You probably only want one deployment at a time, so you can use :
258+ {% include rr.html id="GH103" %} You probably only want one deployment at a
259+ time, so you can use :
257260
258261` ` ` yaml
259262concurrency:
@@ -325,8 +328,9 @@ These are some things you might need.
325328
326329# ## Cancel existing runs
327330
328- If you add the following, you can ensure only one run per PR/branch happens at a
329- time, cancelling the old run when a new one starts :
331+ {% include rr.html id="GH102" %} If you add the following, you can ensure only
332+ one run per PR/branch happens at a time, cancelling the old run when a new one
333+ starts :
330334
331335{% raw %}
332336
0 commit comments