Skip to content

Commit cce9eab

Browse files
committed
use lint-rst as an example of an action
1 parent e0ef93b commit cce9eab

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

src/doc/en/developer/github.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ installed by running
8282

8383
[alice@localhost sage]$ gh extension install https://github.com/nektos/gh-act
8484

85-
Append `--force` flag to force an upgrade.
86-
More details on configuring and using `gh act` are in :ref:`chapter-portability_testing`.
85+
Append ``--force`` flag to force an upgrade.
86+
More details on configuring and using ``gh act`` are in :ref:`chapter-portability_testing`.
8787

8888

8989
Linking Git to your GitHub account

src/doc/en/developer/portability_testing.rst

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,43 +1157,53 @@ Testing GitHub Actions locally
11571157

11581158
`act <https://github.com/nektos/act>`_ is a tool, written in Go, and using Docker,
11591159
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``. ::
11611161

11621162
[alice@localhost sage]$ gh extension install https://github.com/nektos/gh-act
11631163

11641164
Extra steps needed for configuration of Docker to run Actions locally can be found on
11651165
`act's GitHub <https://github.com/nektos/act>`_
11661166

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::
11701170

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]$
11771176

1178-
run a particular action ``foobar`` ::
1177+
run a particular action ``lint-rst`` ::
11791178

1180-
[alice@localhost sage]$ gh act -j foobar
1179+
[alice@localhost sage]$ gh act -j lint-rst
11811180
...
11821181

11831182
and so on.
11841183

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::
11871186

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
11891199

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.
11931203

11941204
.. TODO::
11951205

1196-
Add more Sage-specfic details for using `act`. PRs welcome!
1206+
Add more Sage-specfic details for using ``act``. PRs welcome!
11971207

11981208
Using our pre-built Docker images for development in VS Code
11991209
============================================================

0 commit comments

Comments
 (0)