-
Notifications
You must be signed in to change notification settings - Fork 204
Single-source CI jobs & use alls-green to check status #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b70c2df
Centralize GH Actions test workflows in one workflow file
CAM-Gerlach ef3720e
Add alls-green CI job to check if all test jobs passed
CAM-Gerlach 61bb3af
Fully rm Py3.8 from CI, update checkout to v6 & set conda-rm-defaults
CAM-Gerlach 76ad6a6
Set default shell for Actions job instead of repeating it every step
CAM-Gerlach 498f9ba
Centralize per job CI config in the matrix itself
CAM-Gerlach ca536f9
Run Windows and Mac jobs on upper-bound Py3.13 not 3.12
CAM-Gerlach 07f0019
Remove intermediate Python versions from the CI test matrix
CAM-Gerlach c73453b
Remove old PyQt6 CI dependency pinning excluding 6.4.0
CAM-Gerlach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| name: Run tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: ${{ matrix.RUNNER_OS }} Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.INSTALL_TYPE }} - ${{ matrix.QT_LIB }} | ||
| runs-on: ${{ matrix.RUNNER_OS }}-latest | ||
| timeout-minutes: 15 | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
| env: | ||
| CI: 'True' | ||
| QTCONSOLE_TESTING: 'True' | ||
| PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | ||
| RUNNER_OS: ${{ matrix.RUNNER_OS }} | ||
| INSTALL_TYPE: ${{ matrix.INSTALL_TYPE }} | ||
| QT_API: ${{ matrix.QT_LIB }} | ||
| PYTEST_QT_API: ${{ matrix.QT_LIB }} | ||
| COVERALLS_REPO_TOKEN: 'XWVhJf2AsO7iouBLuCsh0pPhwHy81Uz1v' | ||
| COVERALLS_SERVICE_NAME: 'github-actions' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| RUNNER_OS: ['ubuntu', 'windows', 'macos'] | ||
| PYTHON_VERSION: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
| INSTALL_TYPE: ['conda', 'pip'] | ||
| QT_LIB: ['pyqt5', 'pyqt6'] | ||
| include: | ||
| - RUNNER_OS: 'ubuntu' | ||
| SPECIAL_INVOCATION: 'xvfb-run --auto-servernum ' | ||
| - INSTALL_TYPE: 'conda' | ||
| REQUIREMENTS_FILE: 'requirements/environment.yml' | ||
| - INSTALL_TYPE: 'pip' | ||
| REQUIREMENTS_FILE: 'requirements/pip.yml' | ||
| - QT_LIB: 'pyqt5' | ||
| QT_DEPS: 'pyqt5' | ||
| - QT_LIB: 'pyqt6' | ||
| QT_DEPS: 'pyqt6!=6.4.0 pyqt6-qt6!=6.4.0' | ||
ccordoba12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - RUNNER_OS: 'ubuntu' | ||
| PYTHON_VERSION: '3.12' | ||
| COVERAGE: 'True' | ||
| COVERAGE_DEPS: 'coveralls pytest-cov' | ||
| PYTEST_COVERAGE_ARGS: '--cov=qtconsole' | ||
| exclude: | ||
ccordoba12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Disable unsupported configurations | ||
| - INSTALL_TYPE: 'conda' | ||
| QT_LIB: 'pyqt6' | ||
| # Prune the number of matrix jobs | ||
| - RUNNER_OS: 'windows' | ||
| PYTHON_VERSION: '3.10' | ||
| - RUNNER_OS: 'windows' | ||
| PYTHON_VERSION: '3.11' | ||
| - RUNNER_OS: 'windows' | ||
| PYTHON_VERSION: '3.12' | ||
| - RUNNER_OS: 'windows' | ||
| INSTALL_TYPE: 'pip' | ||
| - RUNNER_OS: 'windows' | ||
| QT_LIB: 'pyqt6' | ||
| - RUNNER_OS: 'macos' | ||
| PYTHON_VERSION: '3.10' | ||
| - RUNNER_OS: 'macos' | ||
| PYTHON_VERSION: '3.11' | ||
| - RUNNER_OS: 'macos' | ||
| PYTHON_VERSION: '3.12' | ||
| - RUNNER_OS: 'macos' | ||
| INSTALL_TYPE: 'pip' | ||
| - RUNNER_OS: 'macos' | ||
| QT_LIB: 'pyqt6' | ||
| steps: | ||
| - name: Checkout branch | ||
| uses: actions/checkout@v6 | ||
| - name: Install Linux packages | ||
| if: matrix.RUNNER_OS == 'ubuntu' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1 | ||
| - name: Install Conda and dependencies | ||
| uses: conda-incubator/setup-miniconda@v3 | ||
| with: | ||
| activate-environment: test | ||
| auto-update-conda: false | ||
| auto-activate-base: false | ||
| miniforge-version: latest | ||
| mamba-version: '*' | ||
| channels: conda-forge | ||
| channel-priority: true | ||
| conda-remove-defaults: 'true' | ||
| python-version: ${{ matrix.PYTHON_VERSION }} | ||
| environment-file: ${{ matrix.REQUIREMENTS_FILE }} # Need to set up dependencies in the same step due to https://github.com/conda-incubator/setup-miniconda/issues/371 | ||
| - name: Install dependencies with Pip | ||
| if: matrix.INSTALL_TYPE == 'pip' | ||
| run: | | ||
| pip install -e .[test] | ||
| pip install ${{ matrix.QT_DEPS }} ${{ matrix.COVERAGE_DEPS }} | ||
| - name: Show environment information | ||
| run: | | ||
| conda info | ||
| conda list | ||
| pip list | ||
| - name: Run tests | ||
| run: ${{ matrix.SPECIAL_INVOCATION }}pytest -vv -s --full-trace --color=yes ${{ matrix.PYTEST_COVERAGE_ARGS }} qtconsole | ||
| - name: Upload coverage to Coveralls | ||
| if: matrix.COVERAGE == 'True' | ||
| run: coveralls | ||
|
|
||
| check: | ||
| name: Check job status | ||
| if: always() | ||
|
|
||
| needs: | ||
| - test | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Determine if all required jobs succeeded | ||
| uses: re-actors/alls-green@release/v1 | ||
| with: | ||
| jobs: ${{ toJSON(needs) }} | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| channels: | ||
| - conda-forge | ||
| dependencies: | ||
| # Main dependencies | ||
| - pip | ||
| - python | ||
| - wheel |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.