diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index 237261ac5..085c03af0 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -145,82 +145,82 @@ jobs: #---------------------------------------------- # Collect plugins that fail linting #---------------------------------------------- - - name: Lint plugins - id: lint_plugins - continue-on-error: true - run: | - declare -a failed_plugins=() - for dir in ./*/; do - current_folder=$(basename "$dir") - if [[ $current_folder == "plugin_globals" ]]; then - continue - fi - cd $current_folder - poetry install --no-interaction --no-root --extras "aca-py" - if poetry run ruff check .; then - echo "plugin $current_folder passed lint check" - else - echo "plugin $current_folder failed lint check" - failed_plugins+=("$current_folder") - fi - cd .. - done - echo lint_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT - #---------------------------------------------- - # Collect plugins that fail unit tests - #---------------------------------------------- - - name: Unit Test Plugins - id: unit_test_plugins - continue-on-error: true - run: | - declare -a failed_plugins=() - for dir in ./*/; do - current_folder=$(basename "$dir") - if [[ $current_folder == "plugin_globals" ]]; then - continue - fi - cd $current_folder - poetry install --no-interaction --no-root --extras "aca-py" - if poetry run pytest; then - echo "plugin $current_folder passed unit test check" - else - echo "plugin $current_folder failed unit test check" - failed_plugins+=("$current_folder") - fi - cd .. - done - echo unit_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT - # ---------------------------------------------- - # Install docker compose - # ---------------------------------------------- - - name: Initialize Docker Compose - uses: isbang/compose-action@v1.5.1 - # ---------------------------------------------- - # Collect plugins that fail integration tests - # ---------------------------------------------- - - name: Integration Test Plugins - id: integration_test_plugins - continue-on-error: true - run: | - trap 'echo "integration_test_exit_code=$?" >> "$GITHUB_OUTPUT"' EXIT - declare -a failed_plugins=() - for dir in ./*/; do - current_folder=$(basename "$dir") - if [[ $current_folder == "plugin_globals" ]]; then - continue - fi - cd $current_folder/integration - docker compose down --remove-orphans - docker compose build - if docker compose run tests; then - echo "plugin $current_folder passed integration test check" - else - echo "plugin $current_folder failed integration test check" - failed_plugins+=("$current_folder") - fi - cd ../.. - done - echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT + # - name: Lint plugins + # id: lint_plugins + # continue-on-error: true + # run: | + # declare -a failed_plugins=() + # for dir in ./*/; do + # current_folder=$(basename "$dir") + # if [[ $current_folder == "plugin_globals" ]]; then + # continue + # fi + # cd $current_folder + # poetry install --no-interaction --no-root --extras "aca-py" + # if poetry run ruff check .; then + # echo "plugin $current_folder passed lint check" + # else + # echo "plugin $current_folder failed lint check" + # failed_plugins+=("$current_folder") + # fi + # cd .. + # done + # echo lint_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT + # #---------------------------------------------- + # # Collect plugins that fail unit tests + # #---------------------------------------------- + # - name: Unit Test Plugins + # id: unit_test_plugins + # continue-on-error: true + # run: | + # declare -a failed_plugins=() + # for dir in ./*/; do + # current_folder=$(basename "$dir") + # if [[ $current_folder == "plugin_globals" ]]; then + # continue + # fi + # cd $current_folder + # poetry install --no-interaction --no-root --extras "aca-py" + # if poetry run pytest; then + # echo "plugin $current_folder passed unit test check" + # else + # echo "plugin $current_folder failed unit test check" + # failed_plugins+=("$current_folder") + # fi + # cd .. + # done + # echo unit_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT + # # ---------------------------------------------- + # # Install docker compose + # # ---------------------------------------------- + # - name: Initialize Docker Compose + # uses: isbang/compose-action@v1.5.1 + # # ---------------------------------------------- + # # Collect plugins that fail integration tests + # # ---------------------------------------------- + # - name: Integration Test Plugins + # id: integration_test_plugins + # continue-on-error: true + # run: | + # trap 'echo "integration_test_exit_code=$?" >> "$GITHUB_OUTPUT"' EXIT + # declare -a failed_plugins=() + # for dir in ./*/; do + # current_folder=$(basename "$dir") + # if [[ $current_folder == "plugin_globals" ]]; then + # continue + # fi + # cd $current_folder/integration + # docker compose down --remove-orphans + # docker compose build + # if docker compose run tests; then + # echo "plugin $current_folder passed integration test check" + # else + # echo "plugin $current_folder failed integration test check" + # failed_plugins+=("$current_folder") + # fi + # cd ../.. + # done + # echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT #---------------------------------------------- # Integration Test Failure Check #---------------------------------------------- @@ -320,11 +320,14 @@ jobs: details=$(printf 'Plugins upgraded this release: \n\t\t - ') plugin_count=${#upgraded_plugins[@]} + echo plugin_count: $plugin_count + echo "$(("$plugin_count" - 2))" for i in $(seq 0 "$(("$plugin_count" - 2))" ); do + echo $i details=$(printf '%s %s \n\t\t - ' "$details" "${upgraded_plugins[$i]}") done - details=$(printf '%s %s \n' "$details" "${upgraded_plugins[-1]}") + details=$(printf '%s %s \n' "$details" "${upgraded_plugins[$plugin_count - 1]}") # Replace the first occurence of ' - ' with the details