Skip to content

Commit 5293b34

Browse files
ci: enhance test workflow with manual trigger and config change detection
- Add workflow_dispatch input to force run tests - Include test configuration file changes in test detection logic - Update .gitignore to ensure JetBrains IDE files are ignored
1 parent 3151229 commit 5293b34

17 files changed

Lines changed: 19 additions & 110 deletions

.github/workflows/ci-tests.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ on:
1313
- develop
1414
- 'specification/**'
1515
- 'implementation/**'
16+
workflow_dispatch:
17+
inputs:
18+
force_run:
19+
description: 'Force run all tests (ignore change detection)'
20+
type: boolean
21+
default: true
1622

1723
jobs:
1824
test:
@@ -47,9 +53,19 @@ jobs:
4753
# Plot implementations don't have unit tests
4854
TESTABLE_CHANGES=$(echo "$CHANGED_FILES" | grep '\.py$' | grep -v '^plots/' || true)
4955
50-
if [[ -n "$TESTABLE_CHANGES" ]]; then
56+
# Also run tests if test configuration files change
57+
CONFIG_CHANGES=$(echo "$CHANGED_FILES" | grep -E '^(pyproject\.toml|pytest\.ini|conftest\.py)$' || true)
58+
59+
# Force run on workflow_dispatch with force_run=true
60+
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.force_run }}" == "true" ]]; then
61+
echo "Manual trigger with force_run=true, will run tests"
62+
echo "should_test=true" >> $GITHUB_OUTPUT
63+
elif [[ -n "$TESTABLE_CHANGES" ]]; then
5164
echo "Found testable Python changes, will run tests"
5265
echo "should_test=true" >> $GITHUB_OUTPUT
66+
elif [[ -n "$CONFIG_CHANGES" ]]; then
67+
echo "Found test config changes ($CONFIG_CHANGES), will run tests"
68+
echo "should_test=true" >> $GITHUB_OUTPUT
5369
else
5470
echo "No testable changes (only plots/ or non-Python), skipping tests"
5571
echo "should_test=false" >> $GITHUB_OUTPUT

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ cython_debug/
172172
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173173
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174174
# and can be added to the global gitignore or merged into this file. For a more nuclear
175-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176-
#.idea/
175+
# JetBrains IDE
176+
.idea/
177177

178178
# Abstra
179179
# Abstra is an AI-powered process automation framework.

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/copilot.data.migration.agent.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/copilot.data.migration.ask.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/copilot.data.migration.ask2agent.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/copilot.data.migration.edit.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/dataSources.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.idea/deployment.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)