Commit graph

45 commits

Author SHA1 Message Date
Earl Warren
05a341e201
actions: add an example for workflow-dispatch
/repos/{owner}/{repo}/actions/workflows/{workflowname}/dispatches

* fails if the required inputs are not provided
* sets defaults to inputs that are not provided

The type of inputs are only used for building the web UI interface,
not for validation. All values are strings.
2024-07-05 07:16:35 +02:00
Earl Warren
64489247aa
actions: run in development mode for debug purposes 2024-07-04 20:15:10 +02:00
Earl Warren
87df9095b9
Revert "actions: use Forgejo runner v3.5.0"
Do not force the runner version, use whatever default setup-forgejo
provides.

Forcing the version will break the cascading-pr workflow. It will
attempt to download a version that does not exist instead of building
it from sources.

This reverts commit dca3641cf3.
2024-07-02 20:54:27 +02:00
Twenty Panda
8b3c0a55e7 actions: test cache/{restore,save}@v4 support 2024-06-22 20:27:04 +02:00
Twenty Panda
dca3641cf3 actions: use Forgejo runner v3.5.0 2024-06-22 20:24:47 +02:00
Earl Warren
2461666aca
lib: use the WORK_PATH base instead of forgejo for the daemon
Instead of hardcoding "forgejo" as the base for the daemon to store
the PID and the logs, use the base of the WORK_PATH so that a given
work path can run a dedicated forgejo instance by the same name.
2024-06-04 13:04:05 +02:00
Earl Warren
4a19e9c90b
lib: get the base of WORK_PATH from app.ini
instead of hardcoding forgejo-work-path to be the base of WORK_PATH
relative to DIR, read it from the app.ini file. It will allow
multiple Forgejo instances to run simultaneously, each using a
different directory.
2024-06-04 12:00:42 +02:00
Earl Warren
9e60ae4449
actions: post-7-0-schedule: create /srv/example/post-7-0-schedule/contexts first
A loop is waiting for /srv/example/post-7-0-schedule-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/post-7-0-schedule/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181

Exactly the same as 57fdd1cd49 but for
post-7-0-schedule instead of cron
2024-06-01 09:36:45 +02:00
Earl Warren
fcb48eff5c
actions: automerge: check when review happens after CI success 2024-05-28 00:47:02 +02:00
Earl Warren
f9e20e7770
actions: add automerge example 2024-05-27 20:57:40 +02:00
Earl Warren
57fdd1cd49
actions: cron: create /srv/example/cron/contexts first
A loop is waiting for /srv/example/cron-volume/DONE to exist before
declaring the workflow is successfully run. But it is not really until
/srv/example/cron/contexts is created with the event content and they
will race.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/181
2024-05-21 08:16:39 +02:00
Earl Warren
9f55d67bd2
actions: push-cancel intermitent failure
A) When both push happen within the same second, the SHA will be
  identical and there will not be any cancelation.
B) When `sleep infinity` happens after the reload of the runner, it
   will block the following tests forever because it has a capacity of one.

Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/144

2024-05-13T00:58:49.1453499Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit
2024-05-13T00:58:49.1453528Z actions_verify_example.out: 3 files changed, 28 insertions(+)
2024-05-13T00:58:49.1453556Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml
2024-05-13T00:58:49.1453585Z actions_verify_example.out: create mode 100755 run.sh
2024-05-13T00:58:49.1453611Z actions_verify_example.out: create mode 100644 teardown.sh
2024-05-13T00:58:49.1453638Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1453669Z actions_verify_example.out:+ git push --force -u origin main
2024-05-13T00:58:49.1453699Z actions_verify_example.out:remote: . Processing 1 references
2024-05-13T00:58:49.1453728Z actions_verify_example.out:remote: Processed 1 references in total
2024-05-13T00:58:49.1453758Z actions_verify_example.out:To http://10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1453786Z actions_verify_example.out: * [new branch]      main -> main
2024-05-13T00:58:49.1453814Z actions_verify_example.out:branch 'main' set up to track 'origin/main'.
...
2024-05-13T00:58:49.1458629Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit
2024-05-13T00:58:49.1458656Z actions_verify_example.out: 3 files changed, 28 insertions(+)
2024-05-13T00:58:49.1458683Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml
2024-05-13T00:58:49.1458711Z actions_verify_example.out: create mode 100755 run.sh
2024-05-13T00:58:49.1458738Z actions_verify_example.out: create mode 100644 teardown.sh
2024-05-13T00:58:49.1458764Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel
2024-05-13T00:58:49.1458795Z actions_verify_example.out:+ git push --force -u origin main
2024-05-13T00:58:49.1458822Z actions_verify_example.out:Everything up-to-date
2024-05-13 19:42:42 +02:00
Earl Warren
e80f12ace9
chore(cleanup): v1.20 is EOL, trim it 2024-04-25 14:24:50 +02:00
TheFox0x7
416db9031b add schedule runs-on variables test for post 7.0 releases (#151)
reimplements: forgejo/end-to-end#146 for 8.0-dev and 8.0-test
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/151
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-04-07 20:25:02 +00:00
Earl Warren
e3a6e1fd8a
Revert "actions: workaround for possible 404 transient bug on artifacts"
Refs: https://code.forgejo.org/forgejo/end-to-end/issues/144

This reverts commit 191976a836.
2024-04-05 05:24:04 +02:00
Earl Warren
191976a836
actions: workaround for possible 404 transient bug on artifacts
Refs: https://codeberg.org/forgejo/forgejo/issues/2949
2024-04-02 07:40:08 +02:00
Earl Warren
cd377ddbad
actions: push-cancel: fix typo 2024-03-26 09:21:32 +01:00
Earl Warren
d8673b8c0b
actions: pull-request: squash main/setup functions 2024-03-26 08:35:16 +01:00
Earl Warren
36456ee74f
actions: pull-request: assert the existence of contexts
and not the existence of tokens
2024-03-26 08:31:26 +01:00
Earl Warren
be033071a4
actions: services: cover the case when no container is specified
When the container for running the steps is specificied, it is setup
differently than when it is implicit. This test adds coverage for both
instead of running all examples with an explicitly specified container
image.
2024-03-24 10:51:02 +01:00
Earl Warren
13f18f9f47
actions: Forgejo 7.0 is equivalent to 7.0-test and run artifacts v4 2024-03-21 17:16:05 +01:00
Earl Warren
a9a46b7b7d
actions: display the runner version 2024-03-21 15:34:38 +01:00
Earl Warren
e1fd4cbc0f
actions: test {upload,download}-artifacts@v4 support
If Forgejo version is >= 7.0 and Forgejo runner > 3.3.0 artifacts@v4
are tested to work with a forked modified version that claims to be
compatible.
2024-03-21 14:25:28 +01:00
Twenty Panda
96f91063c9 merge actions test into end-to-end.sh
* replace the high level test running actions tests with end-to-end.sh
* set DOMAIN to the IP instead of 127.0.0.1 for runner <-> forgejo communications
* move forgejo_cli from a function to a file so that it can be used by forgejo-runner.sh
* keep the documentation updates workflows separate because they need to open one PR per version
2024-03-20 13:42:44 +01:00
Earl Warren
78027e672d
Forgejo v1.22 will actually be Forgejo v7.0 2024-02-28 17:38:31 +01:00
username
5cdebe65db
actions/example-cron: verify the type of the event 2024-01-18 18:06:08 +00:00
Earl Warren
dcc61603a2
actions: add example-tag 2024-01-13 18:21:50 +01:00
Earl Warren
9222919990
actions: push: paths 2024-01-13 17:38:04 +01:00
Earl Warren
465538429e
actions: add example-push 2024-01-12 17:15:47 +01:00
Earl Warren
b648c1cd50
actions: use volumes: instead of options:
for test coverage purposes
2024-01-10 21:38:05 +01:00
Earl Warren
3a47977c68
actions: context: add github. 2024-01-10 16:12:47 +01:00
Earl Warren
921ed6f481
actions: update the documentation with context examples 2024-01-08 00:07:40 +01:00
Earl Warren
f0570182b8
do not hardcode the full version 2024-01-07 18:45:15 +01:00
Earl Warren
4768908489
actions: add context example 2024-01-05 23:17:38 +01:00
Earl Warren
c5cccca38d
actions: service: upgrade node:20-bookworm 2024-01-05 19:37:32 +01:00
Earl Warren
66b125cffa
actions: container: upgrade alpine 3.19 2024-01-05 19:37:32 +01:00
Earl Warren
b63144cb0d
always allow workflows to mount /srv/example
because it is generally useful to store informations about how the
workflow ran
2024-01-05 19:37:32 +01:00
username
d772474759
actions/example-cron: branch creation must not impact the default 2023-12-26 10:06:52 +01:00
Earl Warren
8358ff2372
actions/example-pull-request: cleanup /srv/example-pull-request 2023-12-20 23:40:34 +01:00
Earl Warren
13283ea0c3
actions/example-cron: fix for local usage 2023-12-20 23:40:34 +01:00
Earl Warren
665da23a48
actions: rework to use binaries instead of docker images 2023-12-20 23:40:33 +01:00
username
600dee1abf
actions/example-pull-request: checkout gets the default branch 2023-11-08 16:04:35 +01:00
username
ee4a08f2b5
actions/example-pull-request: move is-forked to its own step 2023-11-08 16:04:34 +01:00
Earl Warren
618c53c682
remove the hashFile() test that has always failed 2023-11-07 18:58:20 +01:00
Earl Warren
7ccbeb7a46
Fogejo Actions tests 2023-10-29 00:03:57 +02:00