diff --git a/.github/workflows/client-compatibility-tests.yml b/.github/workflows/client-compatibility-tests.yml index e46c0fe3db0..5f158378de0 100644 --- a/.github/workflows/client-compatibility-tests.yml +++ b/.github/workflows/client-compatibility-tests.yml @@ -75,6 +75,54 @@ jobs: cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} cache_restore_only: "true" binary_name: tests + # We need to provide TOML configs to test execution step, because tests binary doesn't containt them + # and we need these default values if we don't want to create them in flight + - name: Gather TOML config files + run: | + cat << EOF > copy_toml.sh + # This script searches for TOML files matching given regex patterns and copies them to a target directory. + + if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 + fi + + declare -a patterns=($1) # Array of regex filename patterns + search_folder=$2 # Folder to search in + target_folder=$3 # Target folder for copying files + + if [ ! -d "$search_folder" ]; then + echo "Search folder does not exist: $search_folder" + exit 1 + fi + + mkdir -p "$target_folder" + + copy_files() { + local pattern=$1 + # Find .toml files, extract filenames, and match pattern + find "$search_folder" -type f -name "*.toml" | while read -r file; do + filename=$(basename "$file") + if [[ $filename =~ $pattern ]]; then + cp "$file" "$target_folder" + fi + done + } + + for pattern in "${patterns[@]}"; do + copy_files "$pattern" + done + + echo "Copy operation completed." + EOF + + /bin/sh ./copy_toml.sh ./integration-tests ./toml_configs + cd ./toml_configs && zip toml_configs.zip ./ + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: toml_configs + path: toml_configs.zip # End Build Test Dependencies @@ -145,6 +193,12 @@ jobs: uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: tests + - name: Download TOML configs artifact + uses: actions/download-artifact@v3 + with: + name: toml_configs + - name: Unzip artifact with TOML configs + run: unzip toml_configs.zip - name: Prepare Base64 TOML config env: SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2