File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed
Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -255,10 +255,30 @@ jobs:
255255 diff-quality --violations=pylint --fail-under=90 pylint_report.txt
256256 - name : Verify that intermediate commits are testable
257257 if : ${{ github.event.pull_request }}
258+ env :
259+ PYTHON_VERSION : ${{ matrix.python-version }}
260+ BASE_REF : ${{ github.event.pull_request.base.ref }}
258261 run : |
259- echo $GITHUB_SHA
260- echo $GITHUB_REF
261-
262+ BASE_DIR="$(pwd)"
263+ echo BASE_REF: $BASE_REF
264+ echo GITHUB_SHA: $GITHUB_SHA
265+ echo GITHUB_REF: $GITHUB_REF
266+ git fetch origin $BASE_REF
267+ COMMIT_RANGE=origin/$BASE_REF..$GITHUB_SHA
268+ echo COMMIT_RANGE: $COMMIT_RANGE
269+ echo Will test the following commits:
270+ git log --oneline --reverse $COMMIT_RANGE
271+ for i in $(git log --pretty=format:%H --reverse $COMMIT_RANGE); do
272+ git checkout $i
273+ make clean
274+ if [[ $PYTHON_VERSION == '2.6' ]]; then
275+ unit2 discover || exit 1
276+ else
277+ python -m unittest discover || exit 1
278+ fi
279+ make test-local || exit 1
280+ cd "$BASE_DIR"
281+ done
262282 - name : Publish coverage to Coveralls
263283 env :
264284 COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
You can’t perform that action at this time.
0 commit comments