From 4f93bcb6f8d8451b6ef6fdfb1cadf02886c0d02b Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 17:44:17 +0100 Subject: [PATCH 01/14] Initial move to run Win tests on GHA. --- .github/workflows/test.yaml | 45 ++++++++++++++++++++++++---- src/twisted/newsfragments/11628.misc | 0 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 src/twisted/newsfragments/11628.misc diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 83f99496a1a..737f9c583c6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,19 +27,31 @@ defaults: jobs: testing: - runs-on: ubuntu-20.04 + runs-on: "${{ matrix.runs-on }}" env: TOXENV: "${{ matrix.tox-env }}" - # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 - # Trial distributed jobs enabled to speed up the CI jobs. - TRIAL_ARGS: "-j 4" + TRIAL_ARGS: "${{ matrix.trial-args }}" + TWISTED_REACTOR: "${{ matrix.twisted-reactor }}" name: ${{ matrix.python-version }}${{ matrix.noipv6 }}-${{ matrix.tox-env }} strategy: fail-fast: false matrix: - # Run on latest minor release of each major python version. + # Run on latest minor release of each major Python version. python-version: ['3.8', '3.9', '3.10'] + # We run with the default reactor. + # The matrix is later extended for specific reactors. + twisted-reactor: ['default'] + # We have Ubuntu as the base for running agains multiple Python versions. + runs-on: ['ubuntu-20.04'] + # This is the main tox target. + # It is later extended with more jobs that should run in a specific + # OS + Python version configuration. tox-env: ['alldeps-withcov-posix'] + # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 + # Trial distributed jobs enabled to speed up the CI jobs. + # On Windows, we don't yet enable distributed tests as is not yet + # supported. + trial-args: ["-j 4"] # By default, tests are executed without disabling IPv6. noipv6: [''] # By default, tests are executed without extra platform dependencies. @@ -50,10 +62,23 @@ jobs: trial-target: [''] include: + # Windows, minimum Python version with select reactor. + - python-version: '3.7' + runs-on: 'windows-2022' + twisted-reactor: 'selectreactor' + # Distributed trial is not yet suported on Windows. + trial-args: '' + # Windows, latest Python version with iocp reactor. + - python-version: '3.10' + runs-on: 'windows-2022' + twisted-reactor: 'iocpreactor' + # Distributed trial is not yet suported on Windows. + trial-args: '' # `noipv6` is created to make sure all is OK on an OS which doesn't # have IPv6 available. # Any supported Python version is OK for this job. - python-version: '3.7' + runs-on: 'ubuntu-20.04' tox-env: alldeps-withcov-posix noipv6: -noipv6 # `nodeps` is created to make sure we don't have import errors in the @@ -65,20 +90,24 @@ jobs: # When updating the minimum Python version here, also update the # `python_requires` from `setup.cfg`. - python-version: '3.7.1' + runs-on: 'ubuntu-20.04' tox-env: nodeps-withcov-posix # On PYPY coverage is very slow (5min vs 30min) as there is no C # extension. # There is very little PYPY specific code so there is not much to # gain from reporting coverage. - python-version: pypy-3.7 + runs-on: 'ubuntu-20.04' tox-env: alldeps-nocov-posix # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 + runs-on: 'ubuntu-20.04' tox-env: alldeps-withcov-posix trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' + runs-on: 'ubuntu-20.04' tox-env: alldeps-gtk-withcov-posix trial-target: twisted.internet.test platform-deps: 'gtk_platform' @@ -108,6 +137,8 @@ jobs: restore-keys: | ${{ runner.os }}-pip- + # Make sure the matrix is defined in such a way that this is triggered + # only on Linux. - name: Disable IPv6 if: matrix.noipv6 run: | @@ -121,6 +152,8 @@ jobs: run: | python -m pip install --upgrade pip tox coverage + # Make sure the matrix is defined in such a way that this is triggered + # only on Linux. - name: Install GTK system deps if: matrix.platform-deps == 'gtk_platform' run: | @@ -153,7 +186,7 @@ jobs: if: ${{ !cancelled() && contains(matrix['tox-env'], 'withcov') }} with: files: coverage.xml - name: lnx-${{ matrix.python-version }}-${{ matrix.tox-env }}${{ matrix.noipv6 }} + name: ${{matrix.runs-on}}-${{ matrix.python-version }}-${{matrix.twisted-reactor}}-${{ matrix.tox-env }}${{ matrix.noipv6 }} fail_ci_if_error: true diff --git a/src/twisted/newsfragments/11628.misc b/src/twisted/newsfragments/11628.misc new file mode 100644 index 00000000000..e69de29bb2d From 4184e078851362b4e4dd6df8cc3cd2cc48cf67f3 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 18:22:00 +0100 Subject: [PATCH 02/14] Refactor default job values. --- .github/workflows/test.yaml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 737f9c583c6..954219862dc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,11 +27,16 @@ defaults: jobs: testing: - runs-on: "${{ matrix.runs-on }}" + # We have Ubuntu as the base for running agains multiple Python versions. + runs-on: "${{ matrix.runs-on || 'ubuntu-20.04'}}" env: - TOXENV: "${{ matrix.tox-env }}" - TRIAL_ARGS: "${{ matrix.trial-args }}" - TWISTED_REACTOR: "${{ matrix.twisted-reactor }}" + # By default we run all tests with all deps with coverage. + TOXENV: "${{ matrix.tox-env || 'alldeps-withcov-posix' }}" + # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 + # Trial distributed jobs enabled to speed up the CI jobs. + # On Windows, we don't yet enable distributed tests as is not yet + # supported. + TRIAL_ARGS: "${{ matrix.trial-args || '-j 4' }}" name: ${{ matrix.python-version }}${{ matrix.noipv6 }}-${{ matrix.tox-env }} strategy: fail-fast: false @@ -40,18 +45,15 @@ jobs: python-version: ['3.8', '3.9', '3.10'] # We run with the default reactor. # The matrix is later extended for specific reactors. - twisted-reactor: ['default'] - # We have Ubuntu as the base for running agains multiple Python versions. - runs-on: ['ubuntu-20.04'] + twisted-reactor: [''] + # Just use the default OS. + runs-on: [''] # This is the main tox target. # It is later extended with more jobs that should run in a specific # OS + Python version configuration. - tox-env: ['alldeps-withcov-posix'] - # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 - # Trial distributed jobs enabled to speed up the CI jobs. - # On Windows, we don't yet enable distributed tests as is not yet - # supported. - trial-args: ["-j 4"] + tox-env: [''] + # We just go with the default arguments. + trial-args: [''] # By default, tests are executed without disabling IPv6. noipv6: [''] # By default, tests are executed without extra platform dependencies. @@ -66,20 +68,20 @@ jobs: - python-version: '3.7' runs-on: 'windows-2022' twisted-reactor: 'selectreactor' + tox-env: 'alldeps-withcov-windows' # Distributed trial is not yet suported on Windows. - trial-args: '' + trial-args: '--reactor=selectreactor' # Windows, latest Python version with iocp reactor. - python-version: '3.10' runs-on: 'windows-2022' - twisted-reactor: 'iocpreactor' + tox-env: 'alldeps-withcov-windows' # Distributed trial is not yet suported on Windows. - trial-args: '' + trial-args: '--reactor=iocpreactor' # `noipv6` is created to make sure all is OK on an OS which doesn't # have IPv6 available. # Any supported Python version is OK for this job. - python-version: '3.7' runs-on: 'ubuntu-20.04' - tox-env: alldeps-withcov-posix noipv6: -noipv6 # `nodeps` is created to make sure we don't have import errors in the # runtime and production code. @@ -103,7 +105,6 @@ jobs: # as there are test with specific code branches for pypy. - python-version: pypy-3.7 runs-on: 'ubuntu-20.04' - tox-env: alldeps-withcov-posix trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' From 4e0a75a8c3516aea2490fa329a076e13ec21b8fc Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 18:33:45 +0100 Subject: [PATCH 03/14] See if the stars were alligned. --- .github/workflows/test.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 954219862dc..c278355a7c5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,6 +27,7 @@ defaults: jobs: testing: + name: ${{ matrix.python-version }}${{ matrix.noipv6 }}-${{ matrix.tox-env || 'default-tests' }}${{matrix.trial-args}} # We have Ubuntu as the base for running agains multiple Python versions. runs-on: "${{ matrix.runs-on || 'ubuntu-20.04'}}" env: @@ -37,15 +38,11 @@ jobs: # On Windows, we don't yet enable distributed tests as is not yet # supported. TRIAL_ARGS: "${{ matrix.trial-args || '-j 4' }}" - name: ${{ matrix.python-version }}${{ matrix.noipv6 }}-${{ matrix.tox-env }} strategy: fail-fast: false matrix: # Run on latest minor release of each major Python version. python-version: ['3.8', '3.9', '3.10'] - # We run with the default reactor. - # The matrix is later extended for specific reactors. - twisted-reactor: [''] # Just use the default OS. runs-on: [''] # This is the main tox target. @@ -62,21 +59,26 @@ jobs: tox-wrapper: [''] # Tests are executed with the default target which is the full test suite. trial-target: [''] + # By default the coverate is not skipped. + skip-coverage: [''] include: # Windows, minimum Python version with select reactor. - python-version: '3.7' runs-on: 'windows-2022' - twisted-reactor: 'selectreactor' tox-env: 'alldeps-withcov-windows' - # Distributed trial is not yet suported on Windows. - trial-args: '--reactor=selectreactor' + # Distributed trial is not yet suported on Windows so we overwrite + # the default trial-args. + # tox will alwasy add `--reactor=default`. The hope is that + # `trial-args` are added at the end and the previous value is + # ignored. + trial-args: '--reactor=select' # Windows, latest Python version with iocp reactor. - python-version: '3.10' runs-on: 'windows-2022' tox-env: 'alldeps-withcov-windows' # Distributed trial is not yet suported on Windows. - trial-args: '--reactor=iocpreactor' + trial-args: '--reactor=iocp' # `noipv6` is created to make sure all is OK on an OS which doesn't # have IPv6 available. # Any supported Python version is OK for this job. @@ -101,6 +103,7 @@ jobs: - python-version: pypy-3.7 runs-on: 'ubuntu-20.04' tox-env: alldeps-nocov-posix + skip-coverage: yes # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 @@ -174,7 +177,7 @@ jobs: ${{ matrix.tox-wrapper }} tox ${{ matrix.trial-target }} - name: Prepare coverage - if: ${{ !cancelled() && contains(matrix['tox-env'], 'withcov') }} + if: ${{ !cancelled() && matrix['skip-coverage'] }} run: | # sub-process coverage are generated in separate files so we combine them # to get an unified coverage for the local run. @@ -184,10 +187,10 @@ jobs: python -m coverage report --skip-covered - uses: codecov/codecov-action@v2 - if: ${{ !cancelled() && contains(matrix['tox-env'], 'withcov') }} + if: ${{ !cancelled() && matrix['skip-coverage'] }} with: files: coverage.xml - name: ${{matrix.runs-on}}-${{ matrix.python-version }}-${{matrix.twisted-reactor}}-${{ matrix.tox-env }}${{ matrix.noipv6 }} + name: ${{matrix.runs-on}}-${{ matrix.python-version }}-${{matrix.trial-args}}-${{ matrix.tox-env }}${{ matrix.noipv6 }} fail_ci_if_error: true From 5e070db56bc393d2af6e3a2007a6b78a1c85c0c4 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 18:45:50 +0100 Subject: [PATCH 04/14] Pass reactor via generic trial args. --- .github/workflows/test.yaml | 11 ++--------- azure-pipelines/run_test_steps.yml | 2 +- tox.ini | 4 ++-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c278355a7c5..995d785c7d3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -68,10 +68,8 @@ jobs: runs-on: 'windows-2022' tox-env: 'alldeps-withcov-windows' # Distributed trial is not yet suported on Windows so we overwrite - # the default trial-args. - # tox will alwasy add `--reactor=default`. The hope is that - # `trial-args` are added at the end and the previous value is - # ignored. + # the default trial-args to remove concurrent runs and to + # select a reactor. trial-args: '--reactor=select' # Windows, latest Python version with iocp reactor. - python-version: '3.10' @@ -83,7 +81,6 @@ jobs: # have IPv6 available. # Any supported Python version is OK for this job. - python-version: '3.7' - runs-on: 'ubuntu-20.04' noipv6: -noipv6 # `nodeps` is created to make sure we don't have import errors in the # runtime and production code. @@ -94,24 +91,20 @@ jobs: # When updating the minimum Python version here, also update the # `python_requires` from `setup.cfg`. - python-version: '3.7.1' - runs-on: 'ubuntu-20.04' tox-env: nodeps-withcov-posix # On PYPY coverage is very slow (5min vs 30min) as there is no C # extension. # There is very little PYPY specific code so there is not much to # gain from reporting coverage. - python-version: pypy-3.7 - runs-on: 'ubuntu-20.04' tox-env: alldeps-nocov-posix skip-coverage: yes # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 - runs-on: 'ubuntu-20.04' trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' - runs-on: 'ubuntu-20.04' tox-env: alldeps-gtk-withcov-posix trial-target: twisted.internet.test platform-deps: 'gtk_platform' diff --git a/azure-pipelines/run_test_steps.yml b/azure-pipelines/run_test_steps.yml index 45bb34f2d30..039d2c7dbe7 100644 --- a/azure-pipelines/run_test_steps.yml +++ b/azure-pipelines/run_test_steps.yml @@ -65,7 +65,7 @@ steps: displayName: 'Run tests' continueOnError: ${{ parameters.allowFailure }} env: - TWISTED_REACTOR: ${{ parameters.windowsReactor }} + TRIAL_ARGS: --reactor=${{ parameters.windowsReactor }} - bash: | # sub-process coverage are generated in separate files so we combine them diff --git a/tox.ini b/tox.ini index 453c58dc3bd..8488971ff12 100644 --- a/tox.ini +++ b/tox.ini @@ -93,12 +93,12 @@ commands = posix: python -c "print('Running on POSIX (no special dependencies)')" ; Run tests without wrapping them using coverage. - nocov: python -m twisted.trial --temp-directory={envtmpdir}/_trial_temp --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {env:TRIAL_ARGS:} {posargs:twisted} + nocov: python -m twisted.trial --temp-directory={envtmpdir}/_trial_temp --reporter={env:TRIAL_REPORTER:verbose} {env:TRIAL_ARGS:} {posargs:twisted} ; Run the tests wrapped using coverage. withcov: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth withcov: coverage erase - withcov: coverage run -p --rcfile={toxinidir}/.coveragerc -m twisted.trial --temp-directory={envtmpdir}/_trial_temp --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {env:TRIAL_ARGS:} {posargs:twisted} + withcov: coverage run -p --rcfile={toxinidir}/.coveragerc -m twisted.trial --temp-directory={envtmpdir}/_trial_temp --reporter={env:TRIAL_REPORTER:verbose} {env:TRIAL_ARGS:} {posargs:twisted} lint: pre-commit {posargs:run --all-files --show-diff-on-failure} From d69db9884b74a3d9dbe6777af689da6fcf66f791 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 19:02:56 +0100 Subject: [PATCH 05/14] Fix skip coverage. Use explicit job name. --- .github/workflows/test.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 995d785c7d3..5e67a8ba69d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,7 +27,7 @@ defaults: jobs: testing: - name: ${{ matrix.python-version }}${{ matrix.noipv6 }}-${{ matrix.tox-env || 'default-tests' }}${{matrix.trial-args}} + name: ${{ matrix.python-version }}${{ matrix.job-name || 'lnx-default-tests' }} # We have Ubuntu as the base for running agains multiple Python versions. runs-on: "${{ matrix.runs-on || 'ubuntu-20.04'}}" env: @@ -45,6 +45,8 @@ jobs: python-version: ['3.8', '3.9', '3.10'] # Just use the default OS. runs-on: [''] + # Human readable short description for this job. + job-name: [''] # This is the main tox target. # It is later extended with more jobs that should run in a specific # OS + Python version configuration. @@ -67,6 +69,7 @@ jobs: - python-version: '3.7' runs-on: 'windows-2022' tox-env: 'alldeps-withcov-windows' + job-name: 'win-default-tests-select' # Distributed trial is not yet suported on Windows so we overwrite # the default trial-args to remove concurrent runs and to # select a reactor. @@ -75,6 +78,7 @@ jobs: - python-version: '3.10' runs-on: 'windows-2022' tox-env: 'alldeps-withcov-windows' + job-name: 'win-default-tests-iocp' # Distributed trial is not yet suported on Windows. trial-args: '--reactor=iocp' # `noipv6` is created to make sure all is OK on an OS which doesn't @@ -82,6 +86,7 @@ jobs: # Any supported Python version is OK for this job. - python-version: '3.7' noipv6: -noipv6 + job-name: 'default-tests-noipv6' # `nodeps` is created to make sure we don't have import errors in the # runtime and production code. # The minimum supported Python version should be used to maximize @@ -92,23 +97,27 @@ jobs: # `python_requires` from `setup.cfg`. - python-version: '3.7.1' tox-env: nodeps-withcov-posix + job-name: 'nodeps-test' # On PYPY coverage is very slow (5min vs 30min) as there is no C # extension. # There is very little PYPY specific code so there is not much to # gain from reporting coverage. - python-version: pypy-3.7 tox-env: alldeps-nocov-posix + job-name: 'pypy-no-coverage' skip-coverage: yes # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests + job-name: 'pypy-coverage' # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' tox-env: alldeps-gtk-withcov-posix trial-target: twisted.internet.test platform-deps: 'gtk_platform' tox-wrapper: 'xvfb-run -a' + job-name: 'gtk-tests' steps: @@ -170,7 +179,7 @@ jobs: ${{ matrix.tox-wrapper }} tox ${{ matrix.trial-target }} - name: Prepare coverage - if: ${{ !cancelled() && matrix['skip-coverage'] }} + if: ${{ !cancelled() && !matrix['skip-coverage'] }} run: | # sub-process coverage are generated in separate files so we combine them # to get an unified coverage for the local run. @@ -180,10 +189,10 @@ jobs: python -m coverage report --skip-covered - uses: codecov/codecov-action@v2 - if: ${{ !cancelled() && matrix['skip-coverage'] }} + if: ${{ !cancelled() && !matrix['skip-coverage'] }} with: files: coverage.xml - name: ${{matrix.runs-on}}-${{ matrix.python-version }}-${{matrix.trial-args}}-${{ matrix.tox-env }}${{ matrix.noipv6 }} + name: ${{ matrix.python-version }}-${{matrix.job-name || 'lnx-default-tests' }} fail_ci_if_error: true From 4896d48971cd867097b8b539a79e68e2b644e9a2 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 19:15:07 +0100 Subject: [PATCH 06/14] Pin external deps actions. Update cache in the hope it will not timeout on windows. Add debug action. --- .github/workflows/test.yaml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5e67a8ba69d..be2906fa0ad 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,11 @@ defaults: run: shell: bash +env: + # Set to 'yes' to open a tunnel to GitHub's VMs through tmate on failures. + # Also increase timeout-minutes for the relevant OS when debugging remotely + # and you need a longer session. + TMATE_DEBUG: 'no' jobs: testing: @@ -134,7 +139,7 @@ jobs: echo "::set-output name=dir::$(pip cache dir)" - name: pip cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} key: @@ -178,8 +183,16 @@ jobs: run: | ${{ matrix.tox-wrapper }} tox ${{ matrix.trial-target }} + # If one of the above steps fails, fire up tmate for remote debugging. + - name: Tmate debug on failure + if: ${{ !cancelled() && env.TMATE_DEBUG == 'yes' }} + # We pin the version 3.11. + uses: mxschmitt/action-tmate@8b4e4ac71822ed7e0ad5fb3d1c33483e9e8fb270 + with: + limit-access-to-actor: true + - name: Prepare coverage - if: ${{ !cancelled() && !matrix['skip-coverage'] }} + if: ${{ !cancelled() && !matrix.skip-coverage }} run: | # sub-process coverage are generated in separate files so we combine them # to get an unified coverage for the local run. @@ -188,7 +201,8 @@ jobs: python -m coverage xml -o coverage.xml -i python -m coverage report --skip-covered - - uses: codecov/codecov-action@v2 + # Pin at 3.1.0 + - uses: codecov/codecov-action@v81cd2dc8148241f03f5839d295e000b8f761e378 if: ${{ !cancelled() && !matrix['skip-coverage'] }} with: files: coverage.xml @@ -317,7 +331,8 @@ jobs: - name: Publish to PyPI - on tag if: startsWith(github.ref, 'refs/tags/twisted-') - uses: pypa/gh-action-pypi-publish@v1.3.1 + # Pin at 1.5.1 + uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f with: password: ${{ secrets.PYPI_UPLOAD_TOKEN }} From b70bb27aedf799a08a00e4ca8267df3fb4512a31 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 19:29:01 +0100 Subject: [PATCH 07/14] Fix external actions versions. --- .github/workflows/test.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index be2906fa0ad..edbcefa6a35 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,5 +1,9 @@ # Try to get a short workflow name and a job name that start with Python # version to make it easier to check the status inside GitHub UI. +# +# When using external actions check that the extenral repos are permitted via +# the GitHub configuration at https://github.com/twisted/twisted/settings/actions +# name: CI on: @@ -32,7 +36,7 @@ env: jobs: testing: - name: ${{ matrix.python-version }}${{ matrix.job-name || 'lnx-default-tests' }} + name: ${{ matrix.python-version }}-${{ matrix.job-name || 'lnx-default-tests' }} # We have Ubuntu as the base for running agains multiple Python versions. runs-on: "${{ matrix.runs-on || 'ubuntu-20.04'}}" env: @@ -45,6 +49,10 @@ jobs: TRIAL_ARGS: "${{ matrix.trial-args || '-j 4' }}" strategy: fail-fast: false + # The matrix is designed to run by default various Python versions with + # the default OS and tests suite. + # Default values should be declared via empty string, to allow them + # to be omitted when extending the matrix. matrix: # Run on latest minor release of each major Python version. python-version: ['3.8', '3.9', '3.10'] @@ -69,6 +77,8 @@ jobs: # By default the coverate is not skipped. skip-coverage: [''] + # Here the matrix is extended with variations of the default + # value. include: # Windows, minimum Python version with select reactor. - python-version: '3.7' @@ -186,8 +196,7 @@ jobs: # If one of the above steps fails, fire up tmate for remote debugging. - name: Tmate debug on failure if: ${{ !cancelled() && env.TMATE_DEBUG == 'yes' }} - # We pin the version 3.11. - uses: mxschmitt/action-tmate@8b4e4ac71822ed7e0ad5fb3d1c33483e9e8fb270 + uses: mxschmitt/action-tmate@v3 with: limit-access-to-actor: true @@ -201,8 +210,7 @@ jobs: python -m coverage xml -o coverage.xml -i python -m coverage report --skip-covered - # Pin at 3.1.0 - - uses: codecov/codecov-action@v81cd2dc8148241f03f5839d295e000b8f761e378 + - uses: codecov/codecov-action@v3 if: ${{ !cancelled() && !matrix['skip-coverage'] }} with: files: coverage.xml @@ -331,8 +339,7 @@ jobs: - name: Publish to PyPI - on tag if: startsWith(github.ref, 'refs/tags/twisted-') - # Pin at 1.5.1 - uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f + uses: pypa/gh-action-pypi-publish@v1 with: password: ${{ secrets.PYPI_UPLOAD_TOKEN }} From a7bb10e4b3099a186938b828f1b3d23b6cc5e1c3 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 19:32:53 +0100 Subject: [PATCH 08/14] Fix pypi version. --- .github/workflows/test.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index edbcefa6a35..7215b4bdd95 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,8 +30,6 @@ defaults: env: # Set to 'yes' to open a tunnel to GitHub's VMs through tmate on failures. - # Also increase timeout-minutes for the relevant OS when debugging remotely - # and you need a longer session. TMATE_DEBUG: 'no' jobs: @@ -339,7 +337,7 @@ jobs: - name: Publish to PyPI - on tag if: startsWith(github.ref, 'refs/tags/twisted-') - uses: pypa/gh-action-pypi-publish@v1 + uses: pypa/gh-action-pypi-publish@v1.5.1 with: password: ${{ secrets.PYPI_UPLOAD_TOKEN }} From 07a812562c1e732c14574a7736d01186b79204d4 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 20:37:18 +0100 Subject: [PATCH 09/14] Define all matrix jobs via include. --- .github/workflows/test.yaml | 89 +++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7215b4bdd95..6767cd306f7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,29 +31,34 @@ defaults: env: # Set to 'yes' to open a tunnel to GitHub's VMs through tmate on failures. TMATE_DEBUG: 'no' + # The default values in the job generated by the matrix. + DEFAULT_JOB_NAME: 'lnx-default-tests' + DEFAULT_PYTHON_VERSION: '3.10' + DEFAULT_RUNS_ON: 'ubuntu-20.04' + DEFAULT_TOX_ENV: 'alldeps-withcov-posix' + DEFAULT_TRIAL_ARGS: '-j 4' jobs: testing: - name: ${{ matrix.python-version }}-${{ matrix.job-name || 'lnx-default-tests' }} + name: ${{ matrix.python-version || env.DEFAULT_PYTHON_VERSION }}-${{ matrix.job-name || env.DEFAULT_JOB_NAME }} # We have Ubuntu as the base for running agains multiple Python versions. - runs-on: "${{ matrix.runs-on || 'ubuntu-20.04'}}" + runs-on: "${{ matrix.runs-on || env.DEFAULT_RUNS_ON }}" env: # By default we run all tests with all deps with coverage. - TOXENV: "${{ matrix.tox-env || 'alldeps-withcov-posix' }}" + TOXENV: "${{ matrix.tox-env || env.DEFAULT_TOX_ENV }}" # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 # Trial distributed jobs enabled to speed up the CI jobs. # On Windows, we don't yet enable distributed tests as is not yet # supported. - TRIAL_ARGS: "${{ matrix.trial-args || '-j 4' }}" + TRIAL_ARGS: "${{ matrix.trial-args || env.DEFAULT_TRIAL_ARGS }}" strategy: fail-fast: false - # The matrix is designed to run by default various Python versions with - # the default OS and tests suite. - # Default values should be declared via empty string, to allow them - # to be omitted when extending the matrix. + # The matrix is designed to not expand into any job. + # It is used to document the test environement variations. + # The actual job enviroment are defined in the `include` section. matrix: - # Run on latest minor release of each major Python version. - python-version: ['3.8', '3.9', '3.10'] + # The Python version on which the job is executed.. + python-version: [''] # Just use the default OS. runs-on: [''] # Human readable short description for this job. @@ -78,6 +83,37 @@ jobs: # Here the matrix is extended with variations of the default # value. include: + + # `nodeps` is created to make sure we don't have import errors in the + # runtime and production code. + # The minimum supported Python version should be used to maximize + # coverage of code that otherwise depends on backports. + # Distributed test run is disabled here so that we also have + # end to end functional test usage for non-distributed trial runs. + # When updating the minimum Python version here, also update the + # `python_requires` from `setup.cfg`. + - python-version: '3.7.1' + tox-env: nodeps-withcov-posix + job-name: 'nodeps-test' + + # `noipv6` is created to make sure all is OK on an OS which doesn't + # have IPv6 available. + # Any supported Python version is OK for this job. + # We go with latest micro release for the smalles minor relase + # that we support. + - python-version: '3.7' + noipv6: -noipv6 + job-name: 'default-tests-noipv6' + + # Just Python 3.8 with default settings. + - python-version: '3.8' + + # Just Python 3.9 with default settings. + - python-version: '3.9' + + # Just Python 3.10 with default settings. + - python-version: '3.10' + # Windows, minimum Python version with select reactor. - python-version: '3.7' runs-on: 'windows-2022' @@ -87,30 +123,15 @@ jobs: # the default trial-args to remove concurrent runs and to # select a reactor. trial-args: '--reactor=select' - # Windows, latest Python version with iocp reactor. + + # Windows, newest Python supported version with iocp reactor. - python-version: '3.10' runs-on: 'windows-2022' tox-env: 'alldeps-withcov-windows' job-name: 'win-default-tests-iocp' # Distributed trial is not yet suported on Windows. trial-args: '--reactor=iocp' - # `noipv6` is created to make sure all is OK on an OS which doesn't - # have IPv6 available. - # Any supported Python version is OK for this job. - - python-version: '3.7' - noipv6: -noipv6 - job-name: 'default-tests-noipv6' - # `nodeps` is created to make sure we don't have import errors in the - # runtime and production code. - # The minimum supported Python version should be used to maximize - # coverage of code that otherwise depends on backports. - # Distributed test run is disabled here so that we also have - # end to end functional test usage for non-distributed trial runs. - # When updating the minimum Python version here, also update the - # `python_requires` from `setup.cfg`. - - python-version: '3.7.1' - tox-env: nodeps-withcov-posix - job-name: 'nodeps-test' + # On PYPY coverage is very slow (5min vs 30min) as there is no C # extension. # There is very little PYPY specific code so there is not much to @@ -119,11 +140,13 @@ jobs: tox-env: alldeps-nocov-posix job-name: 'pypy-no-coverage' skip-coverage: yes + # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests job-name: 'pypy-coverage' + # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' tox-env: alldeps-gtk-withcov-posix @@ -212,7 +235,7 @@ jobs: if: ${{ !cancelled() && !matrix['skip-coverage'] }} with: files: coverage.xml - name: ${{ matrix.python-version }}-${{matrix.job-name || 'lnx-default-tests' }} + name: ${{ matrix.python-version || env.DEFAULT_PYTHON_VERSION }}-${{matrix.job-name || 'lnx-default-tests' }} fail_ci_if_error: true @@ -231,7 +254,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: '${{ env.DEFAULT_PYTHON_VERSION }}' - name: Install dependencies run: | @@ -277,7 +300,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '${{ env.DEFAULT_PYTHON_VERSION }}' - name: Install dependencies run: | python -m pip install --upgrade pip tox @@ -294,7 +317,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '{{ env.DEFAULT_PYTHON_VERSION }}' - name: Install dependencies run: | python -m pip install --upgrade pip tox @@ -318,7 +341,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '${{ env.DEFAULT_PYTHON_VERSION }}' - name: Test run: | From f5662ebd791508294e657bddec85c5f60abf8b70 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 21:00:24 +0100 Subject: [PATCH 10/14] Fix typos and env usage add manual trigger. --- .github/workflows/test.yaml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6767cd306f7..f0816af5f7d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,7 @@ # Try to get a short workflow name and a job name that start with Python # version to make it easier to check the status inside GitHub UI. # -# When using external actions check that the extenral repos are permitted via +# When using external actions check that the external repos are permitted via # the GitHub configuration at https://github.com/twisted/twisted/settings/actions # name: CI @@ -14,6 +14,13 @@ on: pull_request: branches: [ trunk ] + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false # Only have a run a single parallel for each branch. # Runs for trunk are queues. @@ -30,27 +37,26 @@ defaults: env: # Set to 'yes' to open a tunnel to GitHub's VMs through tmate on failures. + # You can also trigger it via manual workflow trigger. + # https://github.com/mxschmitt/action-tmate#manually-triggered-debug TMATE_DEBUG: 'no' # The default values in the job generated by the matrix. - DEFAULT_JOB_NAME: 'lnx-default-tests' DEFAULT_PYTHON_VERSION: '3.10' - DEFAULT_RUNS_ON: 'ubuntu-20.04' - DEFAULT_TOX_ENV: 'alldeps-withcov-posix' - DEFAULT_TRIAL_ARGS: '-j 4' jobs: testing: - name: ${{ matrix.python-version || env.DEFAULT_PYTHON_VERSION }}-${{ matrix.job-name || env.DEFAULT_JOB_NAME }} + # We can't use `env.*` in the job name, only in the steps. + name: ${{ matrix.python-version }}-${{ matrix.job-name || 'default-tests' }} # We have Ubuntu as the base for running agains multiple Python versions. - runs-on: "${{ matrix.runs-on || env.DEFAULT_RUNS_ON }}" + runs-on: "${{ matrix.runs-on || 'ubuntu-20.04' }}" env: # By default we run all tests with all deps with coverage. - TOXENV: "${{ matrix.tox-env || env.DEFAULT_TOX_ENV }}" + TOXENV: "${{ matrix.tox-env || 'alldeps-withcov-posix' }}" # As of April 2021 GHA VM have 2 CPUs - Azure Standard_DS2_v2 # Trial distributed jobs enabled to speed up the CI jobs. # On Windows, we don't yet enable distributed tests as is not yet # supported. - TRIAL_ARGS: "${{ matrix.trial-args || env.DEFAULT_TRIAL_ARGS }}" + TRIAL_ARGS: "${{ matrix.trial-args || '-j 4' }}" strategy: fail-fast: false # The matrix is designed to not expand into any job. @@ -77,7 +83,7 @@ jobs: tox-wrapper: [''] # Tests are executed with the default target which is the full test suite. trial-target: [''] - # By default the coverate is not skipped. + # By default the coverage is not skipped. skip-coverage: [''] # Here the matrix is extended with variations of the default @@ -138,14 +144,14 @@ jobs: # gain from reporting coverage. - python-version: pypy-3.7 tox-env: alldeps-nocov-posix - job-name: 'pypy-no-coverage' + job-name: 'no-coverage' skip-coverage: yes # We still run some tests with coverage, # as there are test with specific code branches for pypy. - python-version: pypy-3.7 trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests - job-name: 'pypy-coverage' + job-name: 'with-coverage' # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' @@ -215,8 +221,9 @@ jobs: ${{ matrix.tox-wrapper }} tox ${{ matrix.trial-target }} # If one of the above steps fails, fire up tmate for remote debugging. - - name: Tmate debug on failure - if: ${{ !cancelled() && env.TMATE_DEBUG == 'yes' }} + # This is fired for manual trigger or via the environment variable. + - name: Tmate debug session + if: ${{ !cancelled() && (env.TMATE_DEBUG == 'yes' || github.event_name == 'workflow_dispatch' && inputs.debug_enabled ) }} uses: mxschmitt/action-tmate@v3 with: limit-access-to-actor: true From 520de930efd484d33db628500ede9d1bbf5eb4df Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 21:08:31 +0100 Subject: [PATCH 11/14] Hack the matrix. --- .github/workflows/test.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f0816af5f7d..053070e2ec1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -63,8 +63,10 @@ jobs: # It is used to document the test environement variations. # The actual job enviroment are defined in the `include` section. matrix: - # The Python version on which the job is executed.. - python-version: [''] + # The Python version on which the job is executed. + # We need at least one value here, so we go with latest Python version + # that we support.. + python-version: ['3.10'] # Just use the default OS. runs-on: [''] # Human readable short description for this job. @@ -117,9 +119,6 @@ jobs: # Just Python 3.9 with default settings. - python-version: '3.9' - # Just Python 3.10 with default settings. - - python-version: '3.10' - # Windows, minimum Python version with select reactor. - python-version: '3.7' runs-on: 'windows-2022' @@ -307,7 +306,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '${{ env.DEFAULT_PYTHON_VERSION }}' + python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - name: Install dependencies run: | python -m pip install --upgrade pip tox @@ -324,7 +323,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '{{ env.DEFAULT_PYTHON_VERSION }}' + python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - name: Install dependencies run: | python -m pip install --upgrade pip tox From 528c3a69e7179ceebaacdece21a21643af724b11 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 30 Aug 2022 22:48:44 +0100 Subject: [PATCH 12/14] Remove win tests from Azure pipelines. --- azure-pipelines/tests_pipeline.yml | 14 ---------- azure-pipelines/windows_test_jobs.yml | 37 --------------------------- 2 files changed, 51 deletions(-) delete mode 100644 azure-pipelines/windows_test_jobs.yml diff --git a/azure-pipelines/tests_pipeline.yml b/azure-pipelines/tests_pipeline.yml index 03d35041b66..c07ac11b31c 100644 --- a/azure-pipelines/tests_pipeline.yml +++ b/azure-pipelines/tests_pipeline.yml @@ -31,17 +31,3 @@ jobs: parameters: pythonVersions: py39: "3.10" - -# Run Windows select reactor on the oldest CPython that we support. -- template: 'windows_test_jobs.yml' - parameters: - pythonVersions: - py37: "3.7" - reactor: select - -# Run Windows iocp reactor on the newest CPython that we support. -- template: 'windows_test_jobs.yml' - parameters: - pythonVersions: - py39: "3.10" - reactor: iocp diff --git a/azure-pipelines/windows_test_jobs.yml b/azure-pipelines/windows_test_jobs.yml deleted file mode 100644 index 563f3485864..00000000000 --- a/azure-pipelines/windows_test_jobs.yml +++ /dev/null @@ -1,37 +0,0 @@ -# -# This is just a template, and not a main pipeline definition. -# -parameters: -- name: imageName - type: string - default: 'windows-latest' -# Must be a mapping of id-suitable-name -> actual version number with dot -- name: pythonVersions - type: object -- name: reactor - type: string - values: - - select - - iocp - -jobs: -- ${{ each pyver in parameters.pythonVersions }}: - - job: ${{ format('windows_{0}_{1}reactor', pyver.key, parameters.reactor) }} - displayName: ${{ format('Windows Py{0} {1}reactor', pyver.value, parameters.reactor) }} - pool: - vmImage: ${{ parameters.imageName }} - variables: - # Set PYTHONUTF8 environment variable to force UTF-8 mode on Python 3.7+ - # on Windows. - # - # Set PYTHONIOENCODING to force UTF-8 encoding on Python 3.6. - # This allows people with non-ASCII characters in their names to file pull requests - # and not trigger CI errors. - PYTHONUTF8: 1 - PYTHONIOENCODING: "utf-8:surrogateescape" - steps: - - template: 'run_test_steps.yml' - parameters: - platform: windows - pythonVersion: ${{ pyver.value }} - windowsReactor: ${{ parameters.reactor }} From 0043ce33eebcf39704bbd2ff49e02aebd95f1b91 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Thu, 1 Sep 2022 11:08:33 +0100 Subject: [PATCH 13/14] [no ci] Typos and explicit string yaml markup. Co-authored-by: Jean-Paul Calderone --- .github/workflows/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 053070e2ec1..4015cb07ef5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -107,10 +107,10 @@ jobs: # `noipv6` is created to make sure all is OK on an OS which doesn't # have IPv6 available. # Any supported Python version is OK for this job. - # We go with latest micro release for the smalles minor relase + # We go with latest micro release for the smallest minor release # that we support. - python-version: '3.7' - noipv6: -noipv6 + noipv6: '-noipv6' job-name: 'default-tests-noipv6' # Just Python 3.8 with default settings. @@ -241,7 +241,7 @@ jobs: if: ${{ !cancelled() && !matrix['skip-coverage'] }} with: files: coverage.xml - name: ${{ matrix.python-version || env.DEFAULT_PYTHON_VERSION }}-${{matrix.job-name || 'lnx-default-tests' }} + name: ${{ matrix.python-version || env.DEFAULT_PYTHON_VERSION }}-${{matrix.job-name || 'default-tests' }} fail_ci_if_error: true From 865eaa8ca27132c5a12fac540d5455bb65bf8af1 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Thu, 1 Sep 2022 11:24:30 +0100 Subject: [PATCH 14/14] Use explicit string markup, --- .github/workflows/test.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4015cb07ef5..5e463f8a9ed 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -101,7 +101,7 @@ jobs: # When updating the minimum Python version here, also update the # `python_requires` from `setup.cfg`. - python-version: '3.7.1' - tox-env: nodeps-withcov-posix + tox-env: 'nodeps-withcov-posix' job-name: 'nodeps-test' # `noipv6` is created to make sure all is OK on an OS which doesn't @@ -141,21 +141,21 @@ jobs: # extension. # There is very little PYPY specific code so there is not much to # gain from reporting coverage. - - python-version: pypy-3.7 - tox-env: alldeps-nocov-posix + - python-version: 'pypy-3.7' + tox-env: 'alldeps-nocov-posix' job-name: 'no-coverage' skip-coverage: yes # We still run some tests with coverage, # as there are test with specific code branches for pypy. - - python-version: pypy-3.7 - trial-target: twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests + - python-version: 'pypy-3.7' + trial-target: 'twisted.test.test_compat twisted.test.test_defer twisted.internet.test.test_socket twisted.trial.test.test_tests' job-name: 'with-coverage' # We run selected test for GTK reactor inside X virtual framebuffer. - python-version: '3.7' - tox-env: alldeps-gtk-withcov-posix - trial-target: twisted.internet.test + tox-env: 'alldeps-gtk-withcov-posix' + trial-target: 'twisted.internet.test' platform-deps: 'gtk_platform' tox-wrapper: 'xvfb-run -a' job-name: 'gtk-tests' @@ -340,7 +340,7 @@ jobs: # The files are published only when a tag is created. release-publish: name: Check release and publish on twisted-* tag - runs-on: ubuntu-20.04 + runs-on: 'ubuntu-20.04' steps: - uses: actions/checkout@v2 @@ -358,7 +358,8 @@ jobs: - uses: twisted/python-info-action@v1 - name: Files to be pushed to PyPi - run: ls -R dist/ + run: | + ls -R dist/ - name: Check matched tag version and branch version - on tag if: startsWith(github.ref, 'refs/tags/twisted-') @@ -373,7 +374,7 @@ jobs: - name: Update stable branch - on stable tag if: startsWith(github.ref, 'refs/tags/twisted-') env: - STABLE_BRANCH: stable + STABLE_BRANCH: 'stable' STABLE_REF_RE: '.*twisted-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$' run: | if [[ $GITUB_REF =~ $STABLE_REF_RE ]]; then