Skip to content

Commit 7f3ae91

Browse files
elifarleyclaude
andcommitted
Consolidate CI workflow to use Makefile targets
- Replace direct `pip install -e ".[dev]"` with `make install` in install step - Remove redundant formatting check and test steps - Consolidate into single unified `make ${MAKE_TARGET}` call with ARGS support - Pass `--junitxml=reports/junit.xml` to generate test reports in one pass - Create reports directory before running tests - Reduces CI execution time and maintenance surface 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3b2b635 commit 7f3ae91

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
# Keep this step hermetic and simple: install editable package with dev extras
5757
run: |
5858
python -m pip install --upgrade pip setuptools wheel
59-
# Use editable install so `make` targets that call python modules run against current source
60-
python -m pip install -e ".[dev]"
59+
make install
6160
# If your project needs additional build steps (e.g. C extensions) add them here.
6261

6362
- name: Show environment (quick debug)
@@ -67,32 +66,17 @@ jobs:
6766
pip list --format=columns | sed -n '1,200p'
6867
echo "Make target: ${MAKE_TARGET}"
6968
70-
- name: Run formatting check (black --check)
71-
# split steps so logs are clearer and failures pinpointed
72-
run: |
73-
set -eo pipefail
74-
make format || true
75-
# enforce check: black --check to ensure CI fails on unformatted code
76-
black --check src tests
77-
78-
- name: Run static checks & tests via Makefile
69+
- name: Run CI pipeline (Makefile)
7970
# Use MAKE_TARGET env to run the aggregate CI target from your Makefile
8071
run: |
8172
set -eo pipefail
73+
mkdir -p reports
8274
# run the Makefile target (defaults to 'ci')
83-
make ${MAKE_TARGET}
75+
# Pass ARGS to generate junit xml during the test phase
76+
make ${MAKE_TARGET} ARGS="--junitxml=reports/junit.xml"
8477
env:
8578
MAKE_TARGET: ${{ env.MAKE_TARGET }}
8679

87-
- name: Run tests again with explicit pytest xml for artifact (optional)
88-
# Some repos emit junit xml for test reporting; optional but useful.
89-
if: always()
90-
run: |
91-
set -eo pipefail
92-
# create junit xml and coverage xml in addition to html (pytest.ini already requests coverage xml)
93-
pytest -q --junitxml=reports/junit.xml || true
94-
continue-on-error: false
95-
9680
- name: Upload coverage HTML (artifact)
9781
if: always()
9882
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)