@@ -1157,43 +1157,53 @@ Testing GitHub Actions locally
1157
1157
1158
1158
`act <https://github.com/nektos/act >`_ is a tool, written in Go, and using Docker,
1159
1159
to run GitHub Actions locally; in particular, it speeds up developing Actions.
1160
- We recommend using `gh extension ` facility to install `act `. ::
1160
+ We recommend using `` gh extension `` facility to install `` act ` `. ::
1161
1161
1162
1162
[alice@localhost sage]$ gh extension install https://github.com/nektos/gh-act
1163
1163
1164
1164
Extra steps needed for configuration of Docker to run Actions locally can be found on
1165
1165
`act's GitHub <https://github.com/nektos/act >`_
1166
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::
1167
+ Here we give a very short sampling of `` act ` `'s capabilities. If you installed standalone
1168
+ `` act `` , it should be invoked as `` act `` , not as `` gh act ` `.
1169
+ After the set up, one can e.g. list all the available linting actions::
1170
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
- [...]
1171
+ [alice@localhost sage]$ gh act -l | grep lint
1172
+ 0 lint-pycodestyle Code style check with pycodestyle Lint lint.yml push,pull_request
1173
+ 0 lint-relint Code style check with relint Lint lint.yml push,pull_request
1174
+ 0 lint-rst Validate docstring markup as RST Lint lint.yml push,pull_request
1175
+ [alice@localhost sage]$
1177
1176
1178
- run a particular action ``foobar `` ::
1177
+ run a particular action ``lint-rst `` ::
1179
1178
1180
- [alice@localhost sage]$ gh act -j foobar
1179
+ [alice@localhost sage]$ gh act -j lint-rst
1181
1180
...
1182
1181
1183
1182
and so on.
1184
1183
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::
1184
+ By default, `` act ` ` pulls all the data needed from the next, but it can also cache it,
1185
+ speeding up repeated runs quite a lot. The following repeats running of ``lint-rst `` using cached data::
1187
1186
1188
- [alice@localhost sage]$ gh act -p false -v -r -j foobar
1187
+ [alice@localhost sage]$ gh act -p false -r -j lint-rst
1188
+ [Lint/Validate docstring markup as RST] 🚀 Start image=catthehacker/ubuntu:act-latest
1189
+ ...
1190
+ | rst: commands[0] /home/alice/work/software/sage/src> flake8 --select=RST
1191
+ | rst: OK (472.60=setup[0.09]+cmd[472.51] seconds)
1192
+ | congratulations :) (474.10 seconds)
1193
+ ...
1194
+ [Lint/Validate docstring markup as RST] ✅ Success - Main Lint using tox -e rst
1195
+ [Lint/Validate docstring markup as RST] ⭐ Run Post Set up Python
1196
+ [Lint/Validate docstring markup as RST] 🐳 docker exec cmd=[node /var/run/act/actions/actions-setup-python@v4/dist/cache-save/index.js] user= workdir=
1197
+ [Lint/Validate docstring markup as RST] ✅ Success - Post Set up Python
1198
+ [Lint/Validate docstring markup as RST] 🏁 Job succeeded
1189
1199
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.
1200
+ Here `` -p false `` means using already pulled Docker images, and `` -r ` ` means do not remove Docker images
1201
+ after a successful run which used them. This, and many more details, can be found by running `` gh act -h ` `, as well
1202
+ as reading `` act ` `'s documentation.
1193
1203
1194
1204
.. TODO ::
1195
1205
1196
- Add more Sage-specfic details for using `act `. PRs welcome!
1206
+ Add more Sage-specfic details for using `` act ` `. PRs welcome!
1197
1207
1198
1208
Using our pre-built Docker images for development in VS Code
1199
1209
============================================================
0 commit comments