Commit graph

56 commits

Author SHA1 Message Date
Andreas Ahlenstorf
372409f76b test: test offline runner registration (#1449)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1449
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
2026-01-19 01:47:27 +00:00
0ko
1ff059023a
chore(release): v15.0 exists (#1310)
Like https://code.forgejo.org/forgejo/end-to-end/pulls/710 and https://code.forgejo.org/forgejo/end-to-end/pulls/1057 (+ https://code.forgejo.org/forgejo/end-to-end/pulls/1058/files)

End-to-end for latest nonLTS is usually retired earlier than EoL to save power per https://code.forgejo.org/forgejo/end-to-end/pulls/1058#issuecomment-61424.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1310
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-12-21 16:53:06 +00:00
famfo
891e8f2d81
mastodon/gotosocial e2e tests: infrastructure changes (#1273)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1273
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2025-12-05 10:40:47 +00:00
0ko
ca5f4d096b
chore(release): v12.0 is EoL (#1058)
Ref https://code.forgejo.org/forgejo/end-to-end/pulls/1057

It will also need a rebase later.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1058
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-09-26 14:15:12 +00:00
0ko
8cfc202cb4
chore(release): v14.0 exists (#1057)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1057
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-09-25 15:06:50 +00:00
Gusted
8f920b4b7a
Add coverage (#914)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/914
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-08-21 04:54:52 +00:00
Earl Warren
f8f9a1bbda
chore(release): v13.0 exists 2025-06-25 07:39:14 +02:00
limiting-factor
5b5dab8c13
chore(revert): fix: alternative route of getting latest Gitea version
Revert 53375283d4
fix: alternative route of getting latest Gitea version

Use git ls-remote and git-mirror instead of the API

$ version=1.23
$ git ls-remote --refs --tags --sort=version:refname https://git-mirror.forgejo.org/go-gitea/gitea "v$version*" | sed -n -E -e "s|^.*/v($version[\.0-9]*)$|\1|p"
1.23.0
1.23.1
1.23.2
1.23.3
1.23.4
1.23.5
1.23.6
1.23.7
2025-05-09 12:37:04 +02:00
Earl Warren
d68ee49e3b
chore(release): v12.0 needs testing 2025-04-10 10:44:11 +02:00
Earl Warren
53375283d4
fix: alternative route of getting latest Gitea version
Use a code.forgejo.org mirror instead of the GitHub API to not be
subject to rate limiting.
2025-03-22 09:43:42 +01:00
Gusted
dd0002c7c6 Update lib/lib.sh 2025-03-21 19:23:49 +00:00
Gusted
cd95e73756 fix: alternative route of getting latest Gitea version
https://gitea.com/gitea/gitea-mirror no longer exists, instead use https://dl.gitea.com/gitea/version.json. Simplifies logic.
2025-03-21 19:02:26 +00:00
limiting-factor
e03278e4c1 fix: lib: use temporary unique file name
The function may be called from scripts that run under different users
and re-using the same file name will run into problems:

/home/debian/.cache/act/2cc577985400de79/hostexecutor/lib/lib.sh: line 96: /tmp/page: Permission denied
curl: (23) Failure writing output to destination
2025-02-23 13:58:45 +01:00
limiting-factor
310322d01f
fix: lib: get all releases (#544)
Loop over all pages instead of getting the first one only to not miss any version.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/544
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2025-02-22 16:26:24 +00:00
limiting-factor
6f6466b3f6
feat: ${FORGEJO_INSTANCE:=https://codeberg.org} (#542)
Do not hardcode https://codeberg.org, use the FORGEJO_INSTANCE variable instead. It can be overriden when codeberg.org is unavailable.

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/542
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2025-02-22 15:55:38 +00:00
limiting-factor
7abcd0e280 fix: Heptapod is not longer available
The default_vcs_type setting is Heptapod specific and cannot be used
for GitLab.

Refs: https://code.forgejo.org/f3/gof3/issues/88
2025-02-22 10:38:35 +01:00
Earl Warren
80b6d688d0
feat: v9.0 is EOL and v11.0 needs testing 2025-01-16 09:43:45 +01:00
Earl Warren
6ce90814b2
fix: do not use api.github.com to avoid being rate limited 2024-12-04 14:11:17 +01:00
Earl Warren
aca70a3e54
lib: retry longer to allow for slower machines
The end-to-end tests moved to a slower machine recently. When the
daily releases are build, the end-to-end all run simultaneously and
slow down the machine to a point where it will take more than 30
seconds for a Forgejo instance to start.

Be more forgiving and let it retry for a minute.

https://code.forgejo.org/forgejo/end-to-end/actions/runs/1857/jobs/6
2024-11-10 08:37:44 +01:00
Earl Warren
94289bc80d
v10.0 development cycle started 2024-09-25 14:12:49 +02:00
limiting-factor
1f2f98fb21 lib: reduce GitLab noise
The absence of the test-gitlab container will display

Error response from daemon: No such container: test-gitlab

which can be mistaken as an actual error where in fact it should be
ignored.
2024-09-02 11:45:26 +02:00
Earl Warren
149c6a545c
lib: source build replace the matching release
Instead of having an explicit vX.Y-dev version to be referenced
explicitly, a binary built from source replaces the matching
version. For instance, if forgejo/build-from-sources contains v9.0,

* the development branch is compiled from source
* the v9.0 artifact is uploaded
* prior to running any test, the artificat is downloaded and used
* the v9.0 binary is not downloaded from
  forgejo/experimental/integration because it is already present

The vX.Y release is built daily and the end-to-end tests run on it. If
a regression is introduced, it will be spotted within 24h.

Compiling from source is used when the Forgejo runs the end-to-end
suite on a specific pull request.
2024-08-08 17:46:04 +02:00
Earl Warren
427c46dbf9
lib: remove RELEASE_NUMBERS_AND_DEV, use RELEASE_NUMBERS
In the lifecycle of vX.Y.Z, all tests are run against vX.Y-test
before it is published, including when the tag is pushed because the
automated release process now runs end-to-end before pushing the
release to forgejo-experimental.

Running end-to-end against vX.Y-dev is therefore redundant with at least
two other runs with exactly the same SHA (the one before the tag is
pushed and the one when the tag is pushed). There would be value in
doing that if it allowed to detect race conditions in Forgejo. But
such races were not found in the past six months and there is a lot
more scrutiny on commits merged in Forgejo which makes it even less
likely than it was before.

Running the tests on vX.Y instead of also including the built version
provide the same coverage and reduces the workload.
2024-08-08 17:46:04 +02:00
Earl Warren
50c5908a91
Forgejo v1.21 is EOL, v9.0 is dev 2024-08-07 11:42:22 +02:00
Earl Warren
d5f66e4c0a
shfmt -w globally 2024-08-07 08:31:33 +02:00
Twenty Panda
b43cfb6e0c cleanup(gitlab): move hardcoded strings to variables [skip ci] 2024-06-25 18:55:19 +02: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
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
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
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
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
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
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
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
3bd723d6b8
upgrades: gitea 1.21.10 -> forgejo 7.0.0 2024-04-13 16:41:24 +02: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
05341f1ae0
Revert "temporarily skip 8.0-test"
This reverts commit 174cb37ac9.
2024-04-07 07:45:05 +02:00
Earl Warren
174cb37ac9
temporarily skip 8.0-test
because 7.0-dev contains a migration that is ahead of 8.0 which should
not happen but does today because a PR was backported. The last one.
2024-04-06 16:15:12 +02:00
Earl Warren
4a6ed59cb6
logs: show logs, not just the .out files 2024-04-06 11:08:05 +02:00
Earl Warren
6be26d2a69
the forgejo development branch is now 8.0 2024-03-30 14:44:43 +01:00
Twenty Panda
02d263e212 lib: ORGANIZATIONS ordered list
they determine the order in which Forgejo binaries will be looked
up. It is moved to a file so it can be overriden to change the order.
2024-03-20 19:49:21 +01:00
earl-warren
b8c71e7201 Merge pull request 'merge actions test into end-to-end.sh' (#112) from twenty-panda/end-to-end:wip-actions into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/112
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-03-20 13:18:28 +00: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
Twenty Panda
81eebc10d8 show the full logs in a separate step for forensic analysis 2024-03-17 21:19:13 +01:00