Merge pull request 'README: update local testing instructions' (#288) from earl-warren/end-to-end:wip-readme into main

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/288
This commit is contained in:
earl-warren 2024-10-06 15:30:39 +00:00
commit 54f810c1df

View file

@ -50,25 +50,26 @@ cd end-to-end
```sh ```sh
make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
cp -a forgejo /srv/forgejo-binaries/forgejo-8.0-dev cp -a forgejo /srv/forgejo-binaries/forgejo-10.0
``` ```
It will be used whenever the version `8.0-dev` is specified in a test. It will be used whenever the version `10.0` is specified in a test.
## Running actions locally ## Running actions locally
To run and debug workflows from `actions/example-*`, from the root of To run and debug workflows from `actions/example-*`, from the root of
the source directory, with docker and forgejo-curl.sh installed, mimic the source directory, with docker and forgejo-curl.sh installed, mimic
what `.forgejo/workflows/actions.yml` does. There may be some manual what `.forgejo/workflows/end-to-end.yml` does. There may be some manual
tweaking (such as creating temporary directories) because the tests tweaking (such as creating temporary directories) because the tests
run as root in the context of Forgejo Actions and assume they have run as root in the context of Forgejo Actions and assume they have
admin permissions. But they do not need to run as root and must work admin permissions. But they do not need to run as root and must work
fine when run as a regular user. fine when run as a regular user.
```sh ```sh
./end-to-end.sh actions_setup 1.21 ./end-to-end.sh run dependencies
./end-to-end.sh actions_setup 10.0
firefox 0.0.0.0:3000 # user root / admin1234 firefox 0.0.0.0:3000 # user root / admin1234
./end-to-end.sh actions_verify_example artifacts ./end-to-end.sh actions_verify_example echo
./end-to-end.sh actions_teardown ./end-to-end.sh actions_teardown
``` ```
## Running other tests locally ## Running other tests locally