8000 Only run ssl tests when OpenSSL related files are changed · python/cpython@3669c9f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3669c9f

Browse files
committed
Only run ssl tests when OpenSSL related files are changed
1 parent 771ad62 commit 3669c9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ jobs:
2323
runs-on: ubuntu-latest
2424
outputs:
2525
run_tests: ${{ steps.check.outputs.run_tests }}
26+
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
2627
steps:
2728
- uses: actions/checkout@v2
2829
- name: Check for source changes
2930
id: check
3031
run: |
3132
if [ -z "$GITHUB_BASE_REF" ]; then
3233
echo '::set-output name=run_tests::true'
34+
echo '::set-output name=run_ssl_tests::true'
3335
else
3436
git fetch origin $GITHUB_BASE_REF --depth=1
3537
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -46,6 +48,7 @@ jobs:
4648
#
4749
# https://github.com/python/core-workflow/issues/373
4850
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
< 9061 /td>51+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
4952
fi
5053
5154
check_generated_files:
@@ -170,7 +173,7 @@ jobs:
170173
name: 'Ubuntu SSL tests with OpenSSL ${{ matrix.openssl_ver }}'
171174
runs-on: ubuntu-20.04
172175
needs: check_source
173-
if: needs.check_source.outputs.run_tests == 'true'
176+
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
174177
strategy:
175178
fail-fast: false
176179
matrix:

0 commit comments

Comments
 (0)
0