[Python-checkins] bpo-42773: fix tests not being run on pushes (GH-24004)

miss-islington webhook-mailer at python.org
Wed Feb 3 18:39:03 EST 2021


https://github.com/python/cpython/commit/0898dcb3a0400d3c93e27f9feb4c2207eb1a996d
commit: 0898dcb3a0400d3c93e27f9feb4c2207eb1a996d
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-02-03T15:38:55-08:00
summary:

bpo-42773: fix tests not being run on pushes (GH-24004)


There was a typo, we were checking if the "GITHUB_BASE_REF" string
literal was empty instead of the $GITHUB_BASE_REF value. When
$GITHUB_BASE_REF is empty, the action that triggered the run was not a
pull request, so we always run the full test suite.

Signed-off-by: Filipe Laíns <lains at riseup.net>
(cherry picked from commit 4ac923f2756f835f512339ee181348cc535ab07f)

Co-authored-by: Filipe Laíns <lains at riseup.net>

files:
M .github/workflows/build.yml

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3d7c9901a8e99..07369ecad27cc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -28,7 +28,7 @@ jobs:
       - name: Check for source changes
         id: check
         run: |
-          if [ -z "GITHUB_BASE_REF" ]; then
+          if [ -z "$GITHUB_BASE_REF" ]; then
             echo '::set-output name=run_tests::true'
           else
             git fetch origin $GITHUB_BASE_REF --depth=1



More information about the Python-checkins mailing list