1- name : geosPythonPackages CI
1+ name : geosPythonPackages CI
22on : pull_request
33
44# Cancels in-progress workflows for a PR when updated
@@ -9,13 +9,13 @@ concurrency:
99
1010jobs :
1111 # Checks if PR title follows conventional semantics
12- semantic_pull_request :
12+ semantic_pull_request :
1313 permissions :
14- pull-requests : write # for amannn/action-semantic-pull-request to analyze PRs and
14+ pull-requests : write # for amannn/action-semantic-pull-request to analyze PRs and
1515 statuses : write # for amannn/action-semantic-pull-request to mark status of analyzed PR
16- contents : read
16+ contents : read
1717 runs-on : ubuntu-latest
18-
18+
1919 steps :
2020 - name : Check if the PR name has conventional semantics
2121 if : github.event_name == 'pull_request'
2727 wip : true
2828 # Configure that a scope doesn't need to be provided.
2929 requireScope : false
30-
30+
3131 - name : Skip the check on main branch
3232 if : github.ref_name == 'main'
3333 run : |
@@ -40,14 +40,14 @@ jobs:
4040 max-parallel : 3
4141 matrix :
4242 python-version : ["3.10", "3.11", "3.12"]
43- package-name :
43+ package-name :
4444 - geos-ats
45+ - geos-utils
4546 - geos-geomechanics
4647 - geos-mesh
4748 - geos-posp
4849 - geos-timehistory
4950 - geos-trame
50- - geos-utils
5151 - geos-xml-tools
5252 - geos-xml-viewer
5353 - hdf5-wrapper
7777 python -m pip install --upgrade pip
7878 python -m pip install pytest yapf toml
7979
80- DEPS="${{ matrix.dependencies || '' }}"
80+ DEPS="${{ matrix.dependencies || '' }}"
8181
8282 if [ -n "$DEPS" ]; then
8383 echo "Installing additional dependencies: $DEPS"
@@ -114,20 +114,20 @@ jobs:
114114 uses : actions/checkout@v4
115115 with :
116116 fetch-depth : 0 # Fetch all history to compare with base branch
117-
117+
118118 - name : Check if GEOS integration is required
119119 id : check_changes
120120 run : |
121121 echo "Analyzing changed files to determine if GEOS integration test is required..."
122-
122+
123123 # Get list of changed files
124124 git fetch origin ${{ github.base_ref }}
125125 CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
126-
126+
127127 echo "Changed files:"
128128 echo "$CHANGED_FILES"
129129 echo ""
130-
130+
131131 # Define packages that are integrated into GEOS (from GEOS/scripts/setupPythonEnvironment.bash)
132132 GEOS_INTEGRATED_PACKAGES=(
133133 "geos-utils"
@@ -137,7 +137,7 @@ jobs:
137137 "pygeos-tools"
138138 "geos-ats"
139139 )
140-
140+
141141 # Define patterns that DON'T require GEOS integration testing
142142 SKIP_PATTERNS=(
143143 "^docs/"
@@ -158,21 +158,21 @@ jobs:
158158 "^geos-trame/"
159159 "^geos-xml-viewer/"
160160 )
161-
161+
162162 # Check if label is present (overrides automatic detection)
163163 HAS_LABEL=$(echo '${{ toJson(github.event.pull_request.labels.*.name) }}' | grep -q "test-geos-integration" && echo "true" || echo "false")
164-
164+
165165 if [[ "$HAS_LABEL" == "true" ]]; then
166166 echo "✓ Label 'test-geos-integration' found - GEOS integration test will run"
167167 echo "required=true" >> "$GITHUB_OUTPUT"
168168 echo "skip_reason=none" >> "$GITHUB_OUTPUT"
169169 exit 0
170170 fi
171-
171+
172172 # Check if any changed file affects GEOS-integrated packages
173173 REQUIRES_GEOS_TEST=false
174174 AFFECTED_PACKAGES=""
175-
175+
176176 for file in $CHANGED_FILES; do
177177 # Check if file matches any skip pattern
178178 SHOULD_SKIP=false
@@ -182,7 +182,7 @@ jobs:
182182 break
183183 fi
184184 done
185-
185+
186186 if [[ "$SHOULD_SKIP" == "false" ]]; then
187187 # Check if file is in a GEOS-integrated package
188188 for package in "${GEOS_INTEGRATED_PACKAGES[@]}"; do
@@ -193,21 +193,21 @@ jobs:
193193 fi
194194 fi
195195 done
196-
196+
197197 # Check for CI workflow changes that affect GEOS integration
198198 if echo "$file" | grep -qE "^\.github/workflows/(python-package\.yml|test_geos_integration\.yml)$"; then
199199 REQUIRES_GEOS_TEST=true
200200 AFFECTED_PACKAGES="$AFFECTED_PACKAGES [CI-workflows]"
201201 fi
202-
202+
203203 # Check for root-level scripts that might affect integration
204204 if echo "$file" | grep -qE "^install_packages\.sh$"; then
205205 REQUIRES_GEOS_TEST=true
206206 AFFECTED_PACKAGES="$AFFECTED_PACKAGES [install-scripts]"
207207 fi
208208 fi
209209 done
210-
210+
211211 if [[ "$REQUIRES_GEOS_TEST" == "true" ]]; then
212212 echo "✓ GEOS integration test REQUIRED"
213213 echo " Affected packages/components:$AFFECTED_PACKAGES"
@@ -240,11 +240,11 @@ jobs:
240240 run : |
241241 echo "Final CI Validation"
242242 echo "==================="
243-
243+
244244 GEOS_REQUIRED="${{ needs.check_geos_integration_required.outputs.geos_integration_required }}"
245245 SKIP_REASON="${{ needs.check_geos_integration_required.outputs.skip_reason }}"
246246 GEOS_RESULT="${{ needs.geos_integration_test.result }}"
247-
247+
248248 if [[ "$GEOS_REQUIRED" == "true" ]]; then
249249 echo "GEOS integration test was required and triggered"
250250 if [[ "$GEOS_RESULT" == "success" ]]; then
0 commit comments