11name : Library Tests (reusable)
22
3- # Heart-owned reusable unit-test workflow for the 5 PyAuto libraries
4- # (Stage 4 Phase A). Each library's own .github/workflows/main.yml is now a thin
5- # caller:
3+ # Heart-owned reusable unit-test workflow for the PyAuto libraries
4+ # (Stage 4 Phase A; PyAutoReduce added as the standalone, no-chain member).
5+ # Each library's own .github/workflows/main.yml is now a thin caller:
66#
77# jobs:
88# unittest:
2222 workflow_call :
2323 inputs :
2424 package :
25- description : " PyAuto package under test: autonerves|autofit|autoarray|autogalaxy|autolens|autocti"
25+ description : " PyAuto package under test: autonerves|autofit|autoarray|autogalaxy|autolens|autocti|autoreduce "
2626 required : true
2727 type : string
2828
@@ -44,10 +44,16 @@ jobs:
4444 autogalaxy) repo=PyAutoGalaxy; deps="PyAutoNerves PyAutoFit PyAutoArray" ;;
4545 autolens) repo=PyAutoLens; deps="PyAutoNerves PyAutoFit PyAutoArray PyAutoGalaxy" ;;
4646 autocti) repo=PyAutoCTI; deps="PyAutoNerves PyAutoFit PyAutoArray" ;;
47+ autoreduce) repo=PyAutoReduce; deps="" ;;
4748 *) echo "::error::unknown package '${{ inputs.package }}'"; exit 1 ;;
4849 esac
50+ # autoreduce is standalone (never imports the PyAuto* stack) and names
51+ # its test extra [test]; the five stack libraries use [optional].
52+ extras=optional
53+ if [ "${{ inputs.package }}" = "autoreduce" ]; then extras=test; fi
4954 echo "repo=$repo" >> "$GITHUB_OUTPUT"
5055 echo "deps=$deps" >> "$GITHUB_OUTPUT"
56+ echo "extras=$extras" >> "$GITHUB_OUTPUT"
5157
5258 - name : Checkout ${{ steps.map.outputs.repo }} (repo under test, at the PR ref)
5359 uses : actions/checkout@v4
8894 pip install --upgrade pip setuptools wheel
8995 pip install pytest coverage pytest-cov
9096 for r in ${{ steps.map.outputs.deps }} ${{ steps.map.outputs.repo }}; do
91- pip install "./$r[optional ]"
97+ pip install "./$r[${{ steps.map.outputs.extras }} ]"
9298 done
9399
94100 - name : Run tests
0 commit comments