summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml38
1 files changed, 27 insertions, 11 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d3d6747..27d7f15 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,27 +1,37 @@
name: Tests
+# bpo-40548: "paths-ignore" is not used to skip documentation-only PRs, because
+# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
+# mandatory but not scheduled because of "paths-ignore".
on:
- #push:
- # branches:
- # - master
- # - 3.8
- # - 3.7
- # paths-ignore:
- # - 'Doc/**'
- # - 'Misc/**'
pull_request:
branches:
- master
- 3.8
- 3.7
- paths-ignore:
- - 'Doc/**'
- - 'Misc/**'
jobs:
+ check_source:
+ name: 'Check for source changes'
+ runs-on: ubuntu-latest
+ outputs:
+ run_tests: ${{ steps.check.outputs.run_tests }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Check for source changes
+ id: check
+ run: |
+ if [ -z "GITHUB_BASE_REF" ]; then
+ echo '::set-output name=run_tests::true'
+ else
+ git fetch origin $GITHUB_BASE_REF --depth=1
+ git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
+ fi
build_win32:
name: 'Windows (x86)'
runs-on: windows-latest
+ needs: check_source
+ if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v1
- name: Build CPython
@@ -34,6 +44,8 @@ jobs:
build_win_amd64:
name: 'Windows (x64)'
runs-on: windows-latest
+ needs: check_source
+ if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v1
- name: Build CPython
@@ -46,6 +58,8 @@ jobs:
build_macos:
name: 'macOS'
runs-on: macos-latest
+ needs: check_source
+ if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v1
- name: Configure CPython
@@ -60,6 +74,8 @@ jobs:
build_ubuntu:
name: 'Ubuntu'
runs-on: ubuntu-latest
+ needs: check_source
+ if: needs.check_source.outputs.run_tests == 'true'
env:
OPENSSL_VER: 1.1.1f
steps: