1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2024-09-19 01:46:16 +00:00

nested integration tests

This commit is contained in:
Earl Warren 2023-05-29 17:12:44 +02:00
parent bf7851a1c5
commit ea6a9c5277
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 24 additions and 57 deletions

View file

@ -0,0 +1,23 @@
on: [ push, pull_request ]
jobs:
integration:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- run: |
set -x
LXC_IP_PREFIX=10.0.9 ./forgejo-dependencies.sh
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.19
#
# Uncomment the following for a shortcut to debugging the Forgejo runner.
# It will build the runner from a designated repository and branch instead of
# downloading it from a canonical release.
#
# ./forgejo-test-helper.sh build_runner http://code.forgejo.org/forgejo/runner branch-under-debug
# export PATH=$(pwd)/forgejo-runner:$PATH
#
./forgejo-runner.sh setup
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
echo "============================ sanity-check ==================="
./forgejo-test-helper.sh push_self_action http://root:admin1234@$(cat forgejo-ip):3000 root setup-forgejo vTest
./forgejo-test-helper.sh run_workflow testdata/sanity-checks http://root:admin1234@$(cat forgejo-ip):3000 root sanity-check setup-forgejo $(cat forgejo-token)

View file

@ -8,10 +8,9 @@ jobs:
set -x
LXC_IP_PREFIX=10.0.10 ./forgejo-dependencies.sh
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.19
export FORGEJO_RUNNER_CONFIG=$(pwd)/runner-config-no-bridge.yaml
./forgejo-runner.sh setup
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
for example in echo container service ; do
for example in echo container ; do
echo "============================ example-$example ==================="
./forgejo-test-helper.sh run_workflow testdata/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token)
done

View file

@ -1,55 +0,0 @@
# Example configuration file, it's safe to copy this as the default config file without any modification.
log:
# The level of logging, can be trace, debug, info, warn, error, fatal
level: info
runner:
# Where to store the registration result.
file: .runner
# Execute how many tasks concurrently at the same time.
capacity: 1
# Extra environment variables to run jobs.
#envs:
# A_TEST_ENV_NAME_1: a_test_env_value_1
# A_TEST_ENV_NAME_2: a_test_env_value_2
# Extra environment variables to run jobs from a file.
# It will be ignored if it's empty or the file doesn't exist.
env_file: .env
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: false
# The timeout for fetching the job from the Gitea instance.
fetch_timeout: 5s
# The interval for fetching the job from the Gitea instance.
fetch_interval: 2s
cache:
# Enable cache server to use actions/cache.
enabled: false
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: ""
# The port of the cache server.
# 0 means to use a random available port.
port: 0
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: ""
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
privileged: false
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
options:
# The parent directory of a job's working directory.
# If it's empty, /workspace will be used.
workdir_parent: