packages: add alpine test cases
This commit is contained in:
parent
d825dac67e
commit
74d11b5eaf
10 changed files with 305 additions and 10 deletions
71
README.md
71
README.md
|
@ -10,17 +10,19 @@ specifically for testing such as
|
|||
They are designed to run using Forgejo releases and development
|
||||
versions compiled from designated repositories.
|
||||
|
||||
## Hacking
|
||||
# Hacking
|
||||
|
||||
To run and debug workflows from `actions/example-*`, from the root of
|
||||
the source directory, with docker and forgejo-curl.sh 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 in the context of Forgejo Actions and assume they have
|
||||
admin permissions. But they do not need to run as root and must work
|
||||
fine when run as a regular user.
|
||||
docker and sudo must be installed with insecure registries allowed in
|
||||
/etc/docker/daemon.json for the IP that will be used for forgejo such
|
||||
as:
|
||||
|
||||
### Prepare the Forgejo instance and the runner
|
||||
```json
|
||||
{
|
||||
"insecure-registries": [ "10.80.4.76:3000" ]
|
||||
}
|
||||
```
|
||||
|
||||
Use setup-forgejo from source.
|
||||
|
||||
```sh
|
||||
git clone https://code.forgejo.org/actions/setup-forgejo
|
||||
|
@ -31,6 +33,23 @@ export DIR=/tmp/end-to-end
|
|||
rm -fr /tmp/end-to-end ; sudo rm -fr /srv/example ; sudo mkdir /srv/example ; sudo chown -R $USER /srv/example
|
||||
```
|
||||
|
||||
Run using Forgejo built from source.
|
||||
|
||||
```sh
|
||||
make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
|
||||
cp -a forgejo $DIR/forgejo
|
||||
```
|
||||
|
||||
## Running actions locally
|
||||
|
||||
To run and debug workflows from `actions/example-*`, from the root of
|
||||
the source directory, with docker and forgejo-curl.sh 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 in the context of Forgejo Actions and assume they have
|
||||
admin permissions. But they do not need to run as root and must work
|
||||
fine when run as a regular user.
|
||||
|
||||
Run one example
|
||||
|
||||
```sh
|
||||
|
@ -56,7 +75,7 @@ make TAGS='bindata sqlite sqlite_unlock_notify' generate forgejo
|
|||
cp -a forgejo $DIR/forgejo
|
||||
```
|
||||
|
||||
### Remote testing
|
||||
Remote testing
|
||||
|
||||
To reduce the runtime the following variables can be set to control
|
||||
the number of cases run by the
|
||||
|
@ -67,3 +86,35 @@ it does not exist, all tests are run.
|
|||
* `V1_22_TESTS`
|
||||
* `V1_21_TESTS`
|
||||
* `V1_20_TESTS`
|
||||
|
||||
## Running packages locally
|
||||
|
||||
To run and debug package tests, from the root of the source directory.
|
||||
|
||||
Run one test
|
||||
|
||||
```sh
|
||||
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v1.22.0-test/forgejo-1.22.0-test-linux-amd64 v1.22.0-test v1_22 alpine # runs packages/alpine.sh
|
||||
```
|
||||
|
||||
Cleanup. It will teardown Forgejo and not run them because there is nothing to test.
|
||||
|
||||
```sh
|
||||
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v1.22.0-test/forgejo-1.22.0-test-linux-amd64 v1.22.0-test v1_22 none
|
||||
```
|
||||
Run all examples for v1_22
|
||||
|
||||
```sh
|
||||
packages/run.sh https://codeberg.org/forgejo-experimental/forgejo/releases/download/v1.22.0-test/forgejo-1.22.0-test-linux-amd64 v1.22.0-test v1_22
|
||||
```
|
||||
|
||||
Remote testing
|
||||
|
||||
To reduce the runtime the following variables can be set to control
|
||||
the number of cases run by the
|
||||
[packages test](.forgejo/workflows/packages.yml) 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_22_PACKAGES_TESTS`
|
||||
* `V1_21_PACKAGES_TESTS`
|
||||
|
|
Loading…
Add table
Reference in a new issue