File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 4646 run : bun install
4747 - name : Run TypeScript tests
4848 env :
49- CHANGED_FILES : ${{ steps.filter.outputs.all_files }}
49+ ALL_CHANGED_FILES : ${{ steps.filter.outputs.all_files }}
5050 SHARED_CHANGED : ${{ steps.filter.outputs.shared }}
51+ MODULE_CHANGED_FILES : ${{ steps.filter.outputs.modules_files }}
5152 run : ./scripts/ts_test_auto.sh
5253 - name : Run Terraform tests
5354 run : ./scripts/terraform_test_all.sh
Original file line number Diff line number Diff line change 22set -euo pipefail
33
44# Auto-detect which TypeScript tests to run based on changed files from paths-filter
5- # Uses paths-filter outputs from GitHub Actions (CHANGED_FILES and SHARED_CHANGED env vars)
5+ # Uses paths-filter outputs from GitHub Actions:
6+ # ALL_CHANGED_FILES - all files changed in the PR (for logging)
7+ # SHARED_CHANGED - boolean indicating if shared infrastructure changed
8+ # MODULE_CHANGED_FILES - only files in registry/**/modules/** (for processing)
69# Runs all tests if shared infrastructure changes
710#
811# This script only runs tests for changed modules. Documentation and template changes are ignored.
912
1013echo " ==> Detecting changed files..."
1114
12- if [[ -z " ${CHANGED_FILES:- } " ]]; then
13- echo " ✓ No files changed, skipping tests"
14- exit 0
15+ if [[ -n " ${ALL_CHANGED_FILES:- } " ]]; then
16+ echo " Changed files in PR:"
17+ echo " $ALL_CHANGED_FILES " | tr ' ' ' \n' | sed ' s/^/ - /'
18+ echo " "
1519fi
1620
17- CHANGED_FILES=$( echo " $CHANGED_FILES " | tr ' ' ' \n' )
21+ if [[ -z " ${MODULE_CHANGED_FILES:- } " ]]; then
22+ echo " ✓ No module files changed, skipping tests"
23+ exit 0
24+ fi
1825
1926if [[ " ${SHARED_CHANGED:- false} " == " true" ]]; then
2027 echo " ==> Shared infrastructure changed"
2128 echo " ==> Running all tests for safety"
2229 exec bun test
2330fi
2431
25- echo " Changed files:"
26- echo " $CHANGED_FILES " | sed ' s/^/ - /'
27- echo " "
32+ CHANGED_FILES=$( echo " $MODULE_CHANGED_FILES " | tr ' ' ' \n' )
2833
2934MODULE_DIRS=()
3035while IFS= read -r file; do
You can’t perform that action at this time.
0 commit comments