Forgejo end-to-end tests
Go to file
2023-11-01 17:44:53 +01:00
.forgejo/workflows run tests on pull requests 2023-11-01 17:44:53 +01:00
actions Fogejo Actions tests 2023-10-29 00:03:57 +02:00
forgejo support refs, not just branches 2023-10-27 18:29:04 +02:00
.gitignore import from forgejo 2023-10-26 21:21:20 +02:00
LICENSE import from forgejo 2023-10-26 21:21:20 +02:00 document how to manually run the actions tests 2023-10-29 17:03:25 +01:00

Forgejo end-to-end tests

A series of tests scenarios and assertions covering Forgejo and the Forgejo runner. They partially rely on Forgejo actions developped specifically for testing such as setup-forgejo.

They are designed to run using Forgejo releases and development versions compiled from designated repositories.


Local testing

To run and debug workflows from actions/example-*, from the root of the source directory, with docker and installed, mimic what .forgejo/workflows/actions.yml does. There may be some manual tweaking (such as creating temporary directories) because the tests run as root, but they do not need to run as root.

  • logout
  • setup root admin1234 1.21
  • firefox http://$(cat forgejo-ip):3000
  • setup
  • export example=pull-request
  • export EXAMPLE_DIR=$(pwd)/actions/example-$example
  • $EXAMPLE_DIR/ # if it exists
  • $EXAMPLE_DIR/ or
  • run_workflow actions/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token)
  • teardown
  • teardown

Remote testing

To reduce the runtime the following variables can be set to control the number of cases run by the actions tests. If set to none they are not run at all for that version of Forgejo. If it does not exist, all tests are run.

  • V1_21_TESTS
  • V1_20_TESTS