Skip to content

Commit

Permalink
ci: run all tests if any ci changes are made
Browse files Browse the repository at this point in the history
  • Loading branch information
vindard committed Feb 14, 2024
1 parent 3dd5357 commit ad61f96
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/check-code-and-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,21 @@ jobs:
DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "api-keys" "notifications" "admin-panel" "map")
LABELS=($(jq -r '.[]' < labels.json))
if [ ${#LABELS[@]} -eq 0 ]; then
LABELS=("${DEFAULT_LABELS[@]}")
elif [ ${#LABELS[@]} -eq 1 ] && [ "${LABELS[0]}" = "ci" ]; then
LABELS=("${DEFAULT_LABELS[@]}")
found_ci=0
for label in "${LABELS[@]}"; do
if [ "$label" = "ci" ]; then
found_ci=1
break
fi
done
UPDATED_LABELS=("${LABELS[@]}")
if [ ${#LABELS[@]} -eq 0 ] || [ $found_ci -eq 1 ]; then
UPDATED_LABELS=("${DEFAULT_LABELS[@]}")
fi
for LABEL in "${LABELS[@]}"; do
for LABEL in "${UPDATED_LABELS[@]}"; do
case "$LABEL" in
dashboard|consent|pay|admin-panel|map)
ARGS+=" //apps/$LABEL:test"
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,21 @@ jobs:
DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "admin-panel" "map")
LABELS=($(jq -r '.[]' < labels.json))
if [ ${#LABELS[@]} -eq 0 ]; then
LABELS=("${DEFAULT_LABELS[@]}")
elif [ ${#LABELS[@]} -eq 1 ] && [ "${LABELS[0]}" = "ci" ]; then
LABELS=("${DEFAULT_LABELS[@]}")
found_ci=0
for label in "${LABELS[@]}"; do
if [ "$label" = "ci" ]; then
found_ci=1
break
fi
done
UPDATED_LABELS=("${LABELS[@]}")
if [ ${#LABELS[@]} -eq 0 ] || [ $found_ci -eq 1 ]; then
UPDATED_LABELS=("${DEFAULT_LABELS[@]}")
fi
for LABEL in "${LABELS[@]}"; do
for LABEL in "${UPDATED_LABELS[@]}"; do
case "$LABEL" in
dashboard|consent|pay|core|admin-panel|map)
ARGS+=" $LABEL"
Expand Down

0 comments on commit ad61f96

Please sign in to comment.