Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# reusable workflow from local repo and same branch as this config
uses: ./.github/workflows/regression_reusable.yaml
with:
env-path: .github/env_nightly
env-path: runner/env_nightly
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# reusable workflow from local repo and same branch as this config
uses: ./.github/workflows/regression_reusable.yaml
with:
env-path: .github/env_nightly_cli
env-path: runner/env_nightly_cli
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_dbsync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# reusable workflow from local repo and same branch as this config
uses: ./.github/workflows/regression_reusable.yaml
with:
env-path: .github/env_nightly_dbsync
env-path: runner/env_nightly_dbsync
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_pv11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# reusable workflow from local repo and same branch as this config
uses: ./.github/workflows/regression_reusable.yaml
with:
env-path: .github/env_nightly_pv11
env-path: runner/env_nightly_pv11
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# reusable workflow from local repo and same branch as this config
uses: ./.github/workflows/upgrade_reusable.yaml
with:
env-path: .github/env_nightly_upgrade
env-path: runner/env_nightly_upgrade
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix_smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
run: |
# env
echo "::group::Script setup"
PY_COLORS=1 TEST_THREADS=0 PYTEST_ARGS="-k test_cli.py --skipall" ./.github/regression.sh
PY_COLORS=1 TEST_THREADS=0 PYTEST_ARGS="-k test_cli.py --skipall" ./runner/regression.sh
echo "::endgroup::"
2 changes: 1 addition & 1 deletion .github/workflows/regression-dbsync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
byron_cluster: ${{ inputs.byron_cluster }}
testrun_name: ${{ inputs.testrun_name }}
skip_passed: ${{ inputs.skip_passed }}
env-path: .github/env_regression_dbsync
env-path: runner/env_regression_dbsync
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
byron_cluster: ${{ inputs.byron_cluster }}
testrun_name: ${{ inputs.testrun_name }}
skip_passed: ${{ inputs.skip_passed }}
env-path: .github/env_regression
env-path: runner/env_regression
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
run: |
# env
echo "::group::Script setup"
.github/regression.sh
runner/regression.sh
echo "::endgroup::"
- name: Report test results
if: (success() || failure()) && inputs.testrun_name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
upgrade_rev: ${{ inputs.upgrade_rev }}
upgrade_cli_rev: ${{ inputs.upgrade_cli_rev }}
byron_cluster: ${{ inputs.byron_cluster }}
env-path: .github/env_upgrade
env-path: runner/env_upgrade
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
# env
echo "::group::Script setup"
./.github/node_upgrade.sh
./runner/node_upgrade.sh
echo "::endgroup::"
- name: ↟ Upload testing artifacts on failure
uses: actions/upload-artifact@v7
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ The `runner/runc.sh` script builds a container image and runs tests inside it us
**Auto-detection:** if the host has `/nix`, it is bind-mounted into an Alpine container. Otherwise a NixOS container with Nix pre-installed is used.

```sh
./runner/runc.sh NODE_REV="10.7.0" UTXO_BACKEND=disk ./.github/regression.sh
./runner/runc.sh NODE_REV="10.7.0" UTXO_BACKEND=disk ./runner/regression.sh
```

Run a specific test:

```sh
./runner/runc.sh NODE_REV="10.7.0" TEST_THREADS=0 CLUSTERS_COUNT=1 PYTEST_ARGS="-k test_minting_one_token" ./.github/regression.sh
./runner/runc.sh NODE_REV="10.7.0" TEST_THREADS=0 CLUSTERS_COUNT=1 PYTEST_ARGS="-k test_minting_one_token" ./runner/regression.sh
```

It is also possible to select a specific Linux distro and version for the container (Ubuntu, Debian, Linux Mint, or NixOS), for example:

```sh
./runner/runc.sh --ubuntu-container=24.04 NODE_REV="10.7.0" ./.github/regression.sh
./runner/runc.sh --ubuntu-container=24.04 NODE_REV="10.7.0" ./runner/regression.sh
```

> ℹ️ Run `./runner/runc.sh` without arguments to see all available options.
Expand All @@ -63,13 +63,13 @@ It is also possible to select a specific Linux distro and version for the contai
2. Run the regression test suite:

```sh
./.github/regression.sh
./runner/regression.sh
```

Or run the upgrade test suite:

```sh
./.github/load-gh-env.sh .github/env_nightly_upgrade CI_BYRON_CLUSTER=false .github/node_upgrade.sh
./runner/load-gh-env.sh runner/env_nightly_upgrade CI_BYRON_CLUSTER=false runner/node_upgrade.sh
```

---
Expand All @@ -81,15 +81,15 @@ It is also possible to select a specific Linux distro and version for the contai
2. Run a specific test:

```sh
TEST_THREADS=0 CLUSTERS_COUNT=1 PYTEST_ARGS="-k 'test_minting_and_burning_sign[asset_name-build_raw-submit_cli]'" ./.github/regression.sh
TEST_THREADS=0 CLUSTERS_COUNT=1 PYTEST_ARGS="-k 'test_minting_and_burning_sign[asset_name-build_raw-submit_cli]'" ./runner/regression.sh
```

3. Clean up by removing binaries from `.bin` after tests complete.

> ℹ️ **Pro Tip:** Enable full CLI command logging:

```sh
PYTEST_ARGS="... --log-level=debug" ./.github/regression.sh
PYTEST_ARGS="... --log-level=debug" ./runner/regression.sh
```

---
Expand Down Expand Up @@ -180,19 +180,19 @@ You can fine-tune test runs using these environment variables:
Run with 6 pools and mixed networking:

```sh
NUM_POOLS=6 ./.github/regression.sh
NUM_POOLS=6 ./runner/regression.sh
```

Run selective tests with filtering:

```sh
TEST_THREADS=15 PYTEST_ARGS="-k 'test_stake_pool_low_cost or test_reward_amount'" MARKEXPR="not long" ./.github/regression.sh
TEST_THREADS=15 PYTEST_ARGS="-k 'test_stake_pool_low_cost or test_reward_amount'" MARKEXPR="not long" ./runner/regression.sh
```

Run on preview testnet with specific node revision:

```sh
NODE_REV=10.5.1 BOOTSTRAP_DIR=~/tmp/preview_config/ ./.github/regression.sh
NODE_REV=10.5.1 BOOTSTRAP_DIR=~/tmp/preview_config/ ./runner/regression.sh
```

---
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion runner/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# the container at image-build time (single-user, no-daemon install).
#
# Usage (via runc.sh):
# ./runc.sh 'NODE_REV="10.7.0" MARKEXPR="testnets" ./.github/regression.sh'
# ./runc.sh 'NODE_REV="10.7.0" MARKEXPR="testnets" ./runner/regression.sh'

set -eu

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/load-gh-env.sh → runner/load-gh-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# - COMMAND [ARGS...]: The command to execute with the loaded environment variables.
#
# Example:
# .github/load-gh-env.sh .github/env_nightly_dbsync MARKEXPR=dbsync .github/regression.sh
# runner/load-gh-env.sh runner/env_nightly_dbsync MARKEXPR=dbsync runner/regression.sh

set -euo pipefail

Expand Down
22 changes: 11 additions & 11 deletions .github/node_upgrade.sh → runner/node_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cd "$REPODIR"
export WORKDIR="$REPODIR/run_workdir"

# shellcheck disable=SC1091
. .github/stop_cluster_instances.sh
. runner/stop_cluster_instances.sh

_cleanup() {
# stop all running cluster instances
Expand Down Expand Up @@ -82,7 +82,7 @@ echo "::group::Nix env setup step1"
printf "start: %(%H:%M:%S)T\n" -1

# shellcheck disable=SC1091
. .github/source_cardano_node.sh
. runner/source_cardano_node.sh

# Prepare cardano-node for the base revision.
# If BASE_TAR_URL is set, instead of using nix, download and extract binaries for base revision
Expand All @@ -104,7 +104,7 @@ PATH_PREPEND_UPGRADE="$(cardano_bins_print_path_prepend "${UPGRADE_CLI_REVISION:
# Prepare cardano-cli for the upgrade revision if UPGRADE_CLI_REVISION is set
if [ -n "${UPGRADE_CLI_REVISION:-}" ]; then
# shellcheck disable=SC1091
. .github/source_cardano_cli.sh
. runner/source_cardano_cli.sh
cardano_cli_build "$UPGRADE_CLI_REVISION" "_upgrade"
PATH_PREPEND_UPGRADE="$(cardano_cli_print_path_prepend "_upgrade")${PATH_PREPEND_UPGRADE}"
fi
Expand All @@ -125,7 +125,7 @@ nix develop --accept-flake-config .#testenv --command bash -c '

echo "::group::Python venv setup step1"
printf "start: %(%H:%M:%S)T\n" -1
. .github/setup_venv.sh clean
. runner/setup_venv.sh clean
export PATH="${PATH_PREPEND_BASE}${PATH}"
echo "::endgroup::" # end group for "Python venv setup step1"

Expand All @@ -134,14 +134,14 @@ nix develop --accept-flake-config .#testenv --command bash -c '
df -h .
# prepare scripts for stating cluster instance, start cluster instance, run smoke tests
retval=0
./.github/node_upgrade_pytest.sh step1 || retval="$?"
./runner/node_upgrade_pytest.sh step1 || retval="$?"
# retval 0 == all tests passed; 1 == some tests failed; > 1 == some runtime error and we do not want to continue
[ "$retval" -le 1 ] || exit "$retval"
echo "::endgroup::" # end group for "Testrun Step1"

echo "::group::Python venv setup steps 2 & 3"
printf "start: %(%H:%M:%S)T\n" -1
. .github/setup_venv.sh clean
. runner/setup_venv.sh clean
export PATH="${PATH_PREPEND_UPGRADE}${PATH}"
echo "::endgroup::" # end group for "Python venv setup steps 2 & 3"

Expand All @@ -150,7 +150,7 @@ nix develop --accept-flake-config .#testenv --command bash -c '
df -h .
# update cluster nodes, run smoke tests
retval=0
./.github/node_upgrade_pytest.sh step2 || retval="$?"
./runner/node_upgrade_pytest.sh step2 || retval="$?"
[ "$retval" -le 1 ] || exit "$retval"
echo "::endgroup::" # end group for "Testrun Step2"

Expand All @@ -159,13 +159,13 @@ nix develop --accept-flake-config .#testenv --command bash -c '
df -h .
# update the rest of cluster nodes, run smoke tests
retval=0
./.github/node_upgrade_pytest.sh step3 || retval="$?"
./runner/node_upgrade_pytest.sh step3 || retval="$?"
echo "::endgroup::" # end group for "Testrun Step3"

echo "::group::Teardown cluster & collect artifacts"
printf "start: %(%H:%M:%S)T\n" -1
df -h .
./.github/node_upgrade_pytest.sh finish || :
./runner/node_upgrade_pytest.sh finish || :
exit $retval
' || retval="$?"

Expand All @@ -175,14 +175,14 @@ if [ ! -e "$WORKDIR/.nix_setup" ]; then
fi

# grep testing artifacts for errors
./.github/grep_errors.sh
./runner/grep_errors.sh

_last_cleanup

# prepare artifacts for upload in GitHub Actions
if [ -n "${GITHUB_ACTIONS:-}" ]; then
# save testing artifacts
./.github/save_artifacts.sh
./runner/save_artifacts.sh
fi

exit "$retval"
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if [ "$1" = "step1" ]; then
[ "$retval" -le 1 ] || "$CLUSTER_SCRIPTS_DIR/stop-cluster"

# create results archive for step1
./.github/create_results.sh .
./runner/create_results.sh .
mv allure-results.tar.xz allure-results-step1.tar.xz

printf "STEP1 finish: %(%H:%M:%S)T\n" -1
Expand Down Expand Up @@ -264,7 +264,7 @@ elif [ "$1" = "step2" ]; then
[ "$retval" -le 1 ] || "$CLUSTER_SCRIPTS_DIR/stop-cluster"

# create results archive for step2
./.github/create_results.sh .
./runner/create_results.sh .
mv allure-results.tar.xz allure-results-step2.tar.xz

[ "$err_retval" -gt "$retval" ] && retval=1
Expand Down Expand Up @@ -409,7 +409,7 @@ elif [ "$1" = "step3" ]; then
||retval="$?"

# create results archive for step3
./.github/create_results.sh .
./runner/create_results.sh .
mv allure-results.tar.xz allure-results-step3.tar.xz

[ "$err_retval" -gt "$retval" ] && retval=1
Expand All @@ -425,7 +425,7 @@ elif [ "$1" = "finish" ]; then
"$CLUSTER_SCRIPTS_DIR/stop-cluster"

# generate CLI coverage reports
./.github/cli_coverage.sh .
./runner/cli_coverage.sh .

retval=0
fi
Expand Down
Loading