@@ -1152,6 +1152,49 @@ are available:
1152
1152
ptest `` has not been run yet.
1153
1153
1154
1154
1155
+ Testing GitHub Actions locally
1156
+ ==============================
1157
+
1158
+ `act <https://github.com/nektos/act >`_ is a tool, written in Go, and using Docker,
1159
+ to run GitHub Actions locally; in particular, it speeds up developing Actions.
1160
+ We recommend using `gh extension ` facility to install `act `. ::
1161
+
1162
+ [alice@localhost sage]$ gh extension install https://github.com/nektos/gh-act
1163
+
1164
+ Extra steps needed for configuration of Docker to run Actions locally can be found on
1165
+ `act's GitHub <https://github.com/nektos/act >`_
1166
+
1167
+ Here we give a very short sampling of `act `'s capabilities. If you installed standalone
1168
+ `act `, it should be called as `act `, not as `gh act `.
1169
+ After the set up, one can e.g. list all the available actions::
1170
+
1171
+ [alice@localhost sage]$ gh act -l
1172
+ Stage Job ID Job name Workflow name Workflow file Events
1173
+ 0 build build Build & Test build.yml workflow_dispatch,pull_request,push
1174
+ 0 test Conda Build & Test using Conda ci-conda.yml push,pull_request,workflow_dispatch
1175
+ 0 cygwin-stage-i-b cygwin-stage-i-b CI cygwin-standard ci-cygwin-standard.yml push,workflow_dispatch
1176
+ [...]
1177
+
1178
+ run a particular action ``foobar `` ::
1179
+
1180
+ [alice@localhost sage]$ gh act -j foobar
1181
+ ...
1182
+
1183
+ and so on.
1184
+
1185
+ By default, `act ` pulls all the data needed from the next, but it can also cache it,
1186
+ speeding up repeated runs quite a lot. The following repeats running of ``foobar `` using cached data::
1187
+
1188
+ [alice@localhost sage]$ gh act -p false -v -r -j foobar
1189
+
1190
+ Here `-p false ` means using already pulled Docker images, and `-r ` means do not remove Docker images
1191
+ after a successful run which used them. This, and many more details, can be found by running `gh act -h `, as well
1192
+ as reading `act `'s documentation.
1193
+
1194
+ .. TODO ::
1195
+
1196
+ Add more Sage-specfic details for using `act `. PRs welcome!
1197
+
1155
1198
Using our pre-built Docker images for development in VS Code
1156
1199
============================================================
1157
1200
0 commit comments