Skip to content

Commit a7f6da0

Browse files
authored
docs: document how to run workflows locally. closes #929 (#929)
2 parents 776f019 + 2d331a9 commit a7f6da0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CONTRIBUTING.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,28 @@ We are using :code:`api-doc` to build the documentation of the lib so if you wan
218218
sphinx-apidoc --force --module-first --templatedir=docs/source/_templates/apidoc -o docs/source/modules
219219
220220
You can then build the documentation, it will automatically call :code:`autodoc` and :code:`autosummary` during the process.
221+
222+
223+
Test the workflows locally
224+
--------------------------
225+
226+
Test your locally your workflows using `Act <https://github.com/nektos/act>`_.
227+
228+
To pass your secrets to the workflows, create a `secrets.env` file and store the secrets of your custom workflow, for example:
229+
230+
.. code-block:: console
231+
232+
EARTHENGINE_TOKEN=""
233+
PLANET_API_CREDENTIALS=""
234+
PLANET_API_KEY=""
235+
FIRMS_API_KEY=""
236+
EARTHENGINE_SERVICE_ACCOUNT=""
237+
238+
Then run the following command:
239+
240+
.. code-block:: console
241+
242+
$ gh act --secret-file $ENV_FILE --workflows .github/workflows/unit.yml
243+
244+
You can change the workflow file to test the one you want, if you are only interested in testing some specific jobs, you can use the `--job` flag.
245+

0 commit comments

Comments
 (0)