From 73d0be72709faeb2a55a2d0521affa6659d29478 Mon Sep 17 00:00:00 2001 From: Anthony Britton <105213050+anthony-britton-moj@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:00:10 +0100 Subject: [PATCH] PI-1414 update pipeline to allow auto passing of projects (#2315) * PI-1414 update pipeline to allow auto passing of projects * PI-1414 update pipeline to allow auto passing of projects * PI-1414 try using different string marks * PI-1414 update to underscore * PI-1414 use jq to merge and intersect * Remove Rogue done --- .github/workflows/end-to-end-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 5e7d31fee4..8cd7856cdc 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -68,6 +68,8 @@ on: # ^ add new projects here # GitHub Actions doesn't support dynamic choices, we must add each project here to enable manual deployments # See https://github.com/community/community/discussions/11795 +env: + auto_pass_projects: '["manage-offences-and-delius"]' jobs: test: @@ -148,6 +150,8 @@ jobs: skipped_projects=$(echo "$all_projects" | jq -r '.[]' | while read -r project; do if [ ! -d "tests/$project" ]; then echo $project; fi; done | jq --raw-input . | jq --slurp --compact-output .) failed_projects=$(jq -r '.suites[].specs[] | select(.ok == false).file' results.json | xargs -n1 dirname | sort -u | jq --raw-input . | jq --slurp --compact-output .) passed_projects=$(jq --compact-output --null-input --argjson all "$all_projects" --argjson failed "$failed_projects" --argjson skipped "$skipped_projects" '{all: $all, failed: $failed, skipped: $skipped} | .all - .failed - .skipped') + merged=$(echo "$auto_pass_projects $passed_projects" | jq -s 'add') + passed_projects=$(echo "$merged $projects" | jq -sc '.[0] - (.[0] - .[1])') fi echo "skipped-projects=${skipped_projects:-'[]'}" | tee -a "$GITHUB_OUTPUT" echo "failed-projects=${failed_projects:-'[]'}" | tee -a "$GITHUB_OUTPUT"