diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b5e5a78f221..4cb3a750e4e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -122,6 +122,18 @@ jobs: # Just Python 3.9 with default settings. - python-version: '3.9' + # Oldest macOS and olders Python supported versions. + # We pin a specific Python micro release due to a TK library bug. + # https://github.com/actions/setup-python/issues/402#issuecomment-1156015780 + - python-version: '3.7.12' + runs-on: 'macos-10.15' + job-name: 'macos-10-default-tests' + + # Newest macOS and newest Python supported versions. + - python-version: '3.10' + runs-on: 'macos-12' + job-name: 'macos-12-default-tests' + # Windows, minimum Python version with select reactor. - python-version: '3.7' runs-on: 'windows-2022' @@ -225,7 +237,7 @@ jobs: # If one of the above steps fails, fire up tmate for remote debugging. # 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 ) }} + if: ${{ failure() && (env.TMATE_DEBUG == 'yes' || github.event_name == 'workflow_dispatch' && inputs.debug_enabled ) }} uses: mxschmitt/action-tmate@v3 with: limit-access-to-actor: true diff --git a/azure-pipelines/macos_test_jobs.yml b/azure-pipelines/macos_test_jobs.yml deleted file mode 100644 index 0dd96a51f66..00000000000 --- a/azure-pipelines/macos_test_jobs.yml +++ /dev/null @@ -1,23 +0,0 @@ -# -# This is just a template, and not a main pipeline definition. -# -parameters: -- name: imageName - type: string - default: 'macOS-latest' -# Must be a mapping of id-suitable-name -> actual version number with dot -- name: pythonVersions - type: object - - -jobs: -- ${{ each pyver in parameters.pythonVersions }}: - - job: ${{ format('macos_{0}', pyver.key) }} - displayName: ${{ format('MacOS Py{0}', pyver.value) }} - pool: - vmImage: ${{ parameters.imageName }} - steps: - - template: 'run_test_steps.yml' - parameters: - platform: macos - pythonVersion: ${{ pyver.value }} diff --git a/azure-pipelines/run_test_steps.yml b/azure-pipelines/run_test_steps.yml deleted file mode 100644 index 039d2c7dbe7..00000000000 --- a/azure-pipelines/run_test_steps.yml +++ /dev/null @@ -1,86 +0,0 @@ -# -# This is just a template, and not a main pipeline definition. -# -parameters: - -- name: platform - type: string - values: - - macos - - windows - -- name: pythonVersion - type: string - values: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - -- name: windowsReactor - type: string - default: select - values: - - select - - iocp - -- name: allowFailure - type: boolean - default: false - -steps: -- checkout: self - clean: true - # A minimum depth of 2 is required, as the HEAD is the auto-merge commit - # and we need the last commit from the PR to report the coverage. - fetchDepth: 2 - -- task: UsePythonVersion@0 - displayName: "Use Python ${{ parameters.pythonVersion }}" - inputs: - versionSpec: "${{ parameters.pythonVersion }}" - -- script: | - python --version - python -c "import sys; print(sys.prefix)" - python -c "import sys; print(sys.exec_prefix)" - python -c "import sys; print(sys.executable)" - python -c "import struct; print(struct.calcsize('P') * 8)" - python -c "print('\nENVIRONMENT VARIABLES\n=====================\n\n')" - python -c "import os; [ print(e,v) for (e,v) in os.environ.items() ]" - displayName: 'Get Python Information' - -- script: 'python -m pip install -U pip setuptools tox coverage coveralls' - displayName: 'Update pip & install tox' - -- ${{ if eq(parameters.platform, 'macos') }}: - - script: 'python -m tox -e alldeps-withcov-posix' - displayName: 'Run tests' - continueOnError: ${{ parameters.allowFailure }} - env: - TRIAL_ARGS: "-j 4" - -- ${{ if eq(parameters.platform, 'windows') }}: - - script: 'python -m tox -e alldeps-withcov-windows' - displayName: 'Run tests' - continueOnError: ${{ parameters.allowFailure }} - env: - TRIAL_ARGS: --reactor=${{ parameters.windowsReactor }} - -- bash: | - # sub-process coverage are generated in separate files so we combine them - # to get an unified coverage for the local run. - # The XML is generate to be used with 3rd party tools like diff-cover. - python -m coverage combine - python -m coverage xml -o coverage.xml -i - python -m coverage report - - displayName: 'Prepare coverage' - condition: always() - continueOnError: true - -- bash: | - bash <(curl -s https://codecov.io/bash) -X search -X gcov -f coverage.xml -n "${{ parameters.platform }}-${{ parameters.pythonVersion }}" - displayName: 'Report to Codecov' - condition: always() - continueOnError: true diff --git a/azure-pipelines/tests_pipeline.yml b/azure-pipelines/tests_pipeline.yml deleted file mode 100644 index c07ac11b31c..00000000000 --- a/azure-pipelines/tests_pipeline.yml +++ /dev/null @@ -1,33 +0,0 @@ -# -# This is the main pipeline enabled in Azure DevOps -# To update the name of this file you will need admin access to Azure. -# -# If the status failed to be reported, check the logs at -# https://dev.azure.com/twistedmatrix/twisted/_build?view=runs -# -# Click on the PR description for more details. -# Don't clock on the icon from the "Stages" column -# -trigger: - batch: true - branches: - include: - - trunk - -pr: - branches: - include: - - trunk - -variables: - INFRASTRUCTURE: "AZUREPIPELINES" - TRIAL_REPORTER: "verbose" - CI: "true" - -jobs: - -# Keep MacOS to latest CPython that we support. -- template: 'macos_test_jobs.yml' - parameters: - pythonVersions: - py39: "3.10" diff --git a/src/twisted/newsfragments/11664.misc b/src/twisted/newsfragments/11664.misc new file mode 100644 index 00000000000..e69de29bb2d