From 1398a54553e74ffd95fceeb815a2029a197d17a8 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:09:40 -0800 Subject: [PATCH] Update Python versions for build and testing. * All builds are Python 3.11 * macOS and Windows testing updated to Python 3.11 * Linux testing updated to 3.9, 3.10, and 3.12 * File tests updated to 3.9-3.12 * SSH debugging option added to all workflow dispatches --- .github/workflows/build-subrepos.yml | 16 +++++++++++++-- .github/workflows/test-files.yml | 30 +++++++++++++++++++++++----- .github/workflows/test-linux.yml | 22 +++++++++++++++----- .github/workflows/test-mac.yml | 13 ++++++++++++ .github/workflows/test-win.yml | 14 +++++++++++++ 5 files changed, 83 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-subrepos.yml b/.github/workflows/build-subrepos.yml index 5307469ba22..278a83475a2 100644 --- a/.github/workflows/build-subrepos.yml +++ b/.github/workflows/build-subrepos.yml @@ -14,6 +14,12 @@ on: type: string workflow_dispatch: + inputs: + ssh: + description: 'Enable ssh debugging' + required: false + default: false + type: boolean concurrency: group: build-subrepos-${{ inputs.branch || github.ref_name }} @@ -30,15 +36,14 @@ jobs: matrix: os: [ubuntu-latest] pkg: [python-lsp-server, qtconsole, spyder-kernels] + python-version: ['3.11'] include: - - python-version: '3.11' - cache-arch: noarch - os: ubuntu-latest pkg: spyder-kernels cache-arch: unix - os: windows-latest pkg: spyder-kernels - python-version: '3.11' cache-arch: win-64 defaults: run: @@ -48,6 +53,13 @@ jobs: pkg: ${{ matrix.pkg }} steps: + - name: Setup Remote SSH Connection + if: env.ENABLE_SSH == 'true' + uses: mxschmitt/action-tmate@v3 + timeout: 60 + with: + detached: true + - name: Checkout Code uses: actions/checkout@v4 with: diff --git a/.github/workflows/test-files.yml b/.github/workflows/test-files.yml index 78a679138c9..dedb17ad300 100644 --- a/.github/workflows/test-files.yml +++ b/.github/workflows/test-files.yml @@ -42,6 +42,13 @@ on: workflow_call: workflow_dispatch: + inputs: + ssh: + # github_cli: gh workflow run test-files.yml --ref -f ssh=true + description: 'Enable ssh debugging' + required: false + default: false + type: boolean concurrency: group: test-files-${{ github.ref }} @@ -61,25 +68,37 @@ jobs: strategy: fail-fast: false matrix: - PYTHON_VERSION: ['3.9', '3.10'] + PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12'] timeout-minutes: 30 + steps: + - name: Setup Remote SSH Connection + if: env.ENABLE_SSH == 'true' + uses: mxschmitt/action-tmate@v3 + timeout: 60 + with: + detached: true + - name: Checkout Pull Requests if: github.event_name == 'pull_request' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Checkout Push if: github.event_name != 'pull_request' uses: actions/checkout@v4 + - name: Fetch branches if: github.event_name == 'pull_request' run: git fetch --prune --unshallow + - name: Install dependencies shell: bash run: | sudo apt-get update --fix-missing sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing + - name: Cache conda uses: actions/cache@v4 env: @@ -88,11 +107,13 @@ jobs: with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-cacheconda-installconda-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }} + - name: Cache pip uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-cachepip-installconda-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} + - name: Create conda test environment uses: mamba-org/setup-micromamba@v1 with: @@ -101,18 +122,17 @@ jobs: environment-name: test cache-downloads: true create-args: python=${{ matrix.PYTHON_VERSION }} + - name: Install additional dependencies shell: bash -l {0} run: bash -l .github/scripts/install.sh + - name: Show test environment shell: bash -l {0} run: | conda info conda list + - name: Run file tests shell: bash -l {0} run: xvfb-run --auto-servernum .github/scripts/modules_test.sh || xvfb-run --auto-servernum .github/scripts/modules_test.sh - # Uncomment this to debug the CI job - # - name: Setup tmate session - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 14e257c6e8b..f90ff942214 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -76,13 +76,10 @@ jobs: fail-fast: false matrix: INSTALL_TYPE: ['pip', 'conda'] - PYTHON_VERSION: ['3.8', '3.10'] + PYTHON_VERSION: ['3.9', '3.10', '3.12'] TEST_TYPE: ['fast', 'slow'] - exclude: - # Only test Python 3.8 with pip because Conda-forge will drop it soon - - INSTALL_TYPE: 'conda' - PYTHON_VERSION: '3.8' timeout-minutes: 90 + steps: - name: Setup Remote SSH Connection if: env.ENABLE_SSH == 'true' @@ -90,21 +87,26 @@ jobs: timeout-minutes: 60 with: detached: true + - name: Checkout Pull Requests if: github.event_name == 'pull_request' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Checkout Push if: github.event_name != 'pull_request' uses: actions/checkout@v4 + - name: Fetch branches run: git fetch --prune --unshallow + - name: Install dependencies shell: bash run: | sudo apt-get update --fix-missing sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing + - name: Cache conda uses: actions/cache@v4 env: @@ -113,11 +115,13 @@ jobs: with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }} + - name: Cache pip uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} + - name: Create conda test environment if: env.USE_CONDA == 'true' uses: mamba-org/setup-micromamba@v1 @@ -127,6 +131,7 @@ jobs: environment-name: test cache-downloads: true create-args: python=${{ matrix.PYTHON_VERSION }} + - name: Create pip test environment if: env.USE_CONDA != 'true' uses: mamba-org/setup-micromamba@v1 @@ -138,15 +143,18 @@ jobs: condarc: | channels: - conda-forge + - name: Install additional dependencies shell: bash -l {0} run: bash -l .github/scripts/install.sh + - name: Show conda test environment if: env.USE_CONDA == 'true' shell: bash -l {0} run: | micromamba info micromamba list + - name: Show pip test environment if: env.USE_CONDA != 'true' shell: bash -l {0} @@ -154,15 +162,18 @@ jobs: micromamba info micromamba list pip list + - name: Run manifest checks shell: bash -l {0} run: check-manifest + - name: Run tests with gdb if: env.USE_GDB == 'true' shell: bash -l {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: xvfb-run --auto-servernum gdb -return-child-result -batch -ex r -ex py-bt --args python runtests.py -s + - name: Run tests shell: bash -l {0} env: @@ -173,6 +184,7 @@ jobs: .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh + - name: Coverage uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/test-mac.yml b/.github/workflows/test-mac.yml index 7ab9d5fa3a6..633fadf479a 100644 --- a/.github/workflows/test-mac.yml +++ b/.github/workflows/test-mac.yml @@ -78,6 +78,7 @@ jobs: PYTHON_VERSION: ['3.11'] TEST_TYPE: ['fast', 'slow'] timeout-minutes: 90 + steps: - name: Setup Remote SSH Connection if: env.ENABLE_SSH == 'true' @@ -85,16 +86,20 @@ jobs: timeout-minutes: 60 with: detached: true + - name: Checkout Pull Requests if: github.event_name == 'pull_request' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Checkout Push if: github.event_name != 'pull_request' uses: actions/checkout@v4 + - name: Fetch branches run: git fetch --prune --unshallow + - name: Cache conda uses: actions/cache@v4 env: @@ -103,16 +108,19 @@ jobs: with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }} + - name: Cache pip uses: actions/cache@v4 with: path: ~/Library/Caches/pip key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} + - name: Install Miniconda uses: conda-incubator/setup-miniconda@v3 with: auto-activate-base: false python-version: ${{ matrix.PYTHON_VERSION }} + - name: Create conda test environment uses: mamba-org/setup-micromamba@v1 with: @@ -121,17 +129,21 @@ jobs: environment-name: test cache-downloads: true create-args: python=${{ matrix.PYTHON_VERSION }} + - name: Install additional dependencies shell: bash -l {0} run: bash -l .github/scripts/install.sh + - name: Show test environment shell: bash -l {0} run: | micromamba info micromamba list + - name: Run manifest checks shell: bash -l {0} run: check-manifest + - name: Run tests shell: bash -l {0} env: @@ -142,6 +154,7 @@ jobs: .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh + - name: Coverage uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/test-win.yml b/.github/workflows/test-win.yml index 6ce2d71f1a9..34a3910c0c8 100644 --- a/.github/workflows/test-win.yml +++ b/.github/workflows/test-win.yml @@ -78,6 +78,7 @@ jobs: PYTHON_VERSION: ['3.11'] TEST_TYPE: ['fast', 'slow'] timeout-minutes: 90 + steps: - name: Setup Remote SSH Connection if: env.ENABLE_SSH == 'true' @@ -85,16 +86,20 @@ jobs: timeout-minutes: 60 with: detached: true + - name: Checkout Pull Requests if: github.event_name == 'pull_request' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Checkout Push if: github.event_name != 'pull_request' uses: actions/checkout@v4 + - name: Fetch branches run: git fetch --prune --unshallow + - name: Cache conda uses: actions/cache@v4 env: @@ -103,11 +108,13 @@ jobs: with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-cacheconda-install${{ matrix.INSTALL_TYPE }}-${{ matrix.PYTHON_VERSION }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/*.yml') }} + - name: Cache pip uses: actions/cache@v4 with: path: ~\AppData\Local\pip\Cache key: ${{ runner.os }}-cachepip-install${{ matrix.INSTALL_TYPE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.py') }} + - name: Create conda test environment if: env.USE_CONDA == 'true' uses: mamba-org/setup-micromamba@v1 @@ -117,6 +124,7 @@ jobs: environment-name: test cache-downloads: true create-args: python=${{ matrix.PYTHON_VERSION }} + - name: Create pip test environment if: env.USE_CONDA != 'true' uses: mamba-org/setup-micromamba@v1 @@ -128,15 +136,18 @@ jobs: condarc: | channels: - conda-forge + - name: Install additional dependencies shell: bash -l {0} run: bash -l .github/scripts/install.sh + - name: Show conda test environment if: env.USE_CONDA == 'true' shell: bash -l {0} run: | micromamba info micromamba list + - name: Show pip test environment if: env.USE_CONDA != 'true' shell: bash -l {0} @@ -144,9 +155,11 @@ jobs: micromamba info micromamba list pip list + - name: Run manifest checks shell: bash -l {0} run: check-manifest + - name: Run tests shell: bash -l {0} env: @@ -157,6 +170,7 @@ jobs: .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh || \ .github/scripts/run_tests.sh + - name: Coverage uses: codecov/codecov-action@v4 with: