Commit graph

240 commits

Author SHA1 Message Date
earl-warren
148b7ca98c Merge pull request 'test: make it easier to comment out tests' (#209) from twenty-panda/end-to-end:wip-test into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/209
2024-06-23 08:26:01 +00:00
earl-warren
d99352c80e Merge pull request 'test: upgrade actions/cache@v4' (#208) from twenty-panda/end-to-end:wip-cache into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/208
2024-06-23 08:25:43 +00:00
Twenty Panda
76ac081fb9 lib: start & stop GitLab
The image is saved to disk and cached because it is over 1GB, to save bandwidthc.
2024-06-23 09:16:25 +02:00
Twenty Panda
6b35ea27c3 test: make it easier to comment out tests
When the build stage is commented out, the /srv/forgejo-binaries
directory will not exist. Change the script to work in both cases.
2024-06-23 09:13:36 +02:00
Twenty Panda
cc16df533b test: upgrade actions/cache@v4
Refs: https://code.forgejo.org/forgejo/runner/issues/209
2024-06-23 09:10:52 +02:00
earl-warren
c2b7f36bc8 Merge pull request 'actions: test cache/{restore,save}@v4 support' (#206) from twenty-panda/end-to-end:wip-cache into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/206
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-22 19:04:03 +00: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
a402d490ba Merge pull request 'upgrades: add Gitea 1.21 & 1.22 to Forgejo 8.0-test' (#205) from twenty-panda/end-to-end:wip-gitea into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/205
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-06-22 11:15:29 +00:00
Twenty Panda
c1ce4361b9 upgrades: add Gitea 1.22.0 & 1.21.11 to Forgejo 8.0-test 2024-06-22 12:42:19 +02:00
earl-warren
9cfd043b8a Merge pull request 'federation: add star scenario' (#196) from earl-warren/end-to-end:wip-federation into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/196
2024-06-07 16:26:04 +00:00
Earl Warren
233b73d7c8
federation: add star scenario
Refs: https://codeberg.org/forgejo/forgejo/pulls/1680
2024-06-04 19:57:31 +02:00
earl-warren
a1b6e192d9 Merge pull request 'federation: stub that checks the nodeinfo of the two instances' (#195) from earl-warren/end-to-end:wip-federation into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/195
2024-06-04 15:32:52 +00:00
Earl Warren
9b6442bfcf
federation: stub that checks the nodeinfo of the two instances 2024-06-04 16:38:32 +02:00
Earl Warren
19ce0fe6b1
lib: add $work_path/forgejo-curl.sh for each Forgejo instance
The $work_path/forgejo-curl.sh for each Forgejo instance is logged
in with admin permissions and ready to use.

The default forgejo-curl.sh remains logged in the last Forgejo
instance that was launched.
2024-06-04 16:30:35 +02:00
Earl Warren
078107026b
lib: get_host_port is $IP:3000 or read from app.ini 2024-06-04 15:29:00 +02:00
Earl Warren
b62866f3ae
lib: move forgejocli to the forgejo instance WORK_PATH
Instead of having it in $DIR so that there can be one forgejocli per
forgejo instance.
2024-06-04 15:29:00 +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
6f3f3ec0f2 Merge pull request 'docs(README): remove unhelpful sentence about actions' (#183) from earl-warren/end-to-end:wip-readme into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/183
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-06-01 14:19:12 +00:00
earl-warren
f8dae4b6c1 Merge pull request 'actions: post-7-0-schedule: create /srv/example/post-7-0-schedule/contexts first' (#192) from earl-warren/end-to-end:wip-cron into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/192
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-06-01 14:18:52 +00: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
2b8c2826c5 Merge pull request 'actions: automerge: check when review happens after CI success' (#189) from earl-warren/end-to-end:wip-automerge into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/189
2024-05-30 20:04:55 +00:00
Earl Warren
fcb48eff5c
actions: automerge: check when review happens after CI success 2024-05-28 00:47:02 +02:00
thefox
7fd268b02f Merge pull request 'actions: add automerge example' (#187) from earl-warren/end-to-end:wip-automerge into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/187
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-27 19:28:55 +00:00
Earl Warren
f9e20e7770
actions: add automerge example 2024-05-27 20:57:40 +02:00
Earl Warren
abe9f5f52d
docs(README): remove unhelpful sentence about actions 2024-05-22 11:07:45 +02:00
thefox
c6cd39b074 Merge pull request 'actions: cron: create /srv/example/cron/contexts first' (#182) from earl-warren/end-to-end:wip-cron into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/182
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-21 06:52:08 +00: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
thefox
657e367db9 Merge pull request 'lib: retry git fetch a few times (take 2)' (#180) from earl-warren/end-to-end:wip-codeberg-retry into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/180
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-20 04:46:11 +00:00
Earl Warren
f6da41ec8e
lib: retry git fetch a few times (take 2)
Wrap the failure in a if statement. Otherwise it will fail the first
time because the script runs under -e
2024-05-20 01:54:22 +02:00
thefox
56fb137646 Merge pull request 'lib: retry git fetch a few times' (#178) from earl-warren/end-to-end:wip-codeberg-retry into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/178
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-19 08:59:09 +00:00
Earl Warren
872e4632bf
lib: retry git fetch a few times
The instance hosting the forgejo repository may be down or very slow
while the build tries to fetch from it, retry a few times instead of
giving up immediately.

A total retry time of 3 * 60 seconds is probably sufficient since
Forgejo startup time is lower than this, even on large instances.
2024-05-19 09:16:55 +02:00
thefox
90e5b72123 Merge pull request 'logs: always prefix with the file name' (#149) from earl-warren/end-to-end:wip-logs into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/149
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-13 19:09:54 +00:00
earl-warren
8d48bb7639 Merge pull request 'actions: push-cancel intermitent failure' (#175) from earl-warren/end-to-end:wip-actions-push-cancel into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/175
Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
2024-05-13 18:33:55 +00: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
888ddb992c Merge pull request 'fix(lib): explicitly set the page limit for releases' (#170) from earl-warren/end-to-end:wip-limit into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/170
2024-05-03 07:13:24 +00:00
Earl Warren
d9fc5cee11
fix(lib): explicitly set the page limit for releases
otherwise it is subject to limitations imposed by the server and as
the number of releases grow, the older ones will no longer be found.
2024-05-03 07:40:34 +01:00
earl-warren
2171ed7a5e Merge pull request 'chore(cleanup): v1.20 is EOL, trim it' (#167) from earl-warren/end-to-end:wip-trim-v1.20 into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/167
2024-04-25 13:21:58 +00:00
Earl Warren
c5a35b1ad5
fix(pprof): reset_forgejo before running it
it was working before because the previous tests did it. Now that it
is gone, it no longer worked because there was no app.ini.
2024-04-25 14:24:52 +02:00
Earl Warren
e80f12ace9
chore(cleanup): v1.20 is EOL, trim it 2024-04-25 14:24:50 +02:00
Earl Warren
456dab5002
docs: managing legacy tests and cutting branches 2024-04-25 13:24:51 +02:00
earl-warren
449890d712 Merge pull request 'lib: sort releases in version order' (#164) from earl-warren/end-to-end:wip-find-download into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/164
2024-04-19 15:20:18 +00:00
Earl Warren
4bff22bc37
lib: sort releases in version order
If sorted in alphabetical order v1.21.11 will be lower than v1.21.8
2024-04-19 16:36:38 +02:00
earl-warren
8260f4ac6f Merge pull request 'upgrades: gitea 1.21.10 -> forgejo 7.0.0' (#158) from earl-warren/end-to-end:wip-gitea-upgrade into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/158
2024-04-13 17:04:52 +00:00
Earl Warren
3bd723d6b8
upgrades: gitea 1.21.10 -> forgejo 7.0.0 2024-04-13 16:41:24 +02:00
thefox
9ca95cd19a add 7.0-test to pprof (#148)
Test backport of pprof to 7.0

Closes #143

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/148
Co-authored-by: thefox <thefox@noreply.code.forgejo.org>
Co-committed-by: thefox <thefox@noreply.code.forgejo.org>
2024-04-13 10:42:40 +00:00
Earl Warren
74294d14f0
logs: always prefix with the file name
otherwise it is difficult to figure out where the runner logs end and
where the forgejo logs start.
2024-04-13 12:09:41 +02:00
earl-warren
e9bb6f67e6 Merge pull request 'Revert "temporarily skip 8.0-test"' (#152) from earl-warren/end-to-end:wip-8-0-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/152
2024-04-12 21:43:36 +00: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