From 8dc2ba701b7d148c379efcb59c69bc39b51eed6f Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sun, 20 Jul 2025 13:42:17 +0100 Subject: [PATCH 01/10] Add integration tests workflow --- .github/workflows/integration_tests.yml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/integration_tests.yml diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml new file mode 100644 index 000000000..123f83285 --- /dev/null +++ b/.github/workflows/integration_tests.yml @@ -0,0 +1,29 @@ +name: Integration tests + +on: + pull_request: + push: + branches-ignore: + - 'dependabot/**' + - 'pre-commit-ci-update-config' + workflow_dispatch: + +jobs: + integration_test: + if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} + name: Integration tests + strategy: + matrix: + EXTENSION_VERSION: ['release', 'dev'] + HYPERSPY_VERSION: ['release', 'RnM', 'RnP'] + # Use the "reusable workflow" from the hyperspy organisation + uses: hyperspy/.github/.github/workflows/integration_tests.yml@main + with: + EXTENSIONS: 'exspy holospy lumispy' + EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} + HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} + USE_CONDA: false + + + + From 5e5726c99cb69ae1b2e7a770f8bb7ce46f546eb5 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sun, 20 Jul 2025 13:54:07 +0100 Subject: [PATCH 02/10] Always run for now --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 123f83285..1988fa57b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -10,7 +10,7 @@ on: jobs: integration_test: - if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} + # if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} name: Integration tests strategy: matrix: From 90bbc64d2a2d45f623bfe41bee8835fc40243b45 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sun, 20 Jul 2025 14:06:15 +0100 Subject: [PATCH 03/10] Disable fast-fail --- .github/workflows/integration_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 1988fa57b..2cf4ebe97 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -13,6 +13,7 @@ jobs: # if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} name: Integration tests strategy: + fail-fast: false matrix: EXTENSION_VERSION: ['release', 'dev'] HYPERSPY_VERSION: ['release', 'RnM', 'RnP'] From 2dd51c2621407ae0e236e235f7adde79b48654fb Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sun, 20 Jul 2025 17:11:48 +0100 Subject: [PATCH 04/10] Add pyxem atomap --- .github/workflows/integration_tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2cf4ebe97..c4ca87b03 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -20,7 +20,9 @@ jobs: # Use the "reusable workflow" from the hyperspy organisation uses: hyperspy/.github/.github/workflows/integration_tests.yml@main with: - EXTENSIONS: 'exspy holospy lumispy' + # don't run etspy until test suite is fixed + # EXTENSIONS: 'exspy holospy lumispy pyxem atomap etspy' + EXTENSIONS: 'exspy holospy lumispy pyxem atomap' EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} USE_CONDA: false From 8ad98b9c338e0f85843bc7216b8524942efb0498 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sun, 20 Jul 2025 20:32:21 +0100 Subject: [PATCH 05/10] Improve name --- .github/workflows/integration_tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c4ca87b03..031124f9a 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -11,7 +11,7 @@ on: jobs: integration_test: # if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} - name: Integration tests + name: hs_${{ matrix.HYPERSPY_VERSION }}-ext_${{ matrix.EXTENSION_VERSION }} strategy: fail-fast: false matrix: @@ -26,7 +26,3 @@ jobs: EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} USE_CONDA: false - - - - From 4446e9c9002602378e0ff6c116313ac9ed311dd6 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Mon, 21 Jul 2025 09:53:46 +0100 Subject: [PATCH 06/10] Use `PIP_EXTRAS` in integration tests to install all optional dependency --- .github/workflows/integration_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 031124f9a..a2359981d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -25,4 +25,5 @@ jobs: EXTENSIONS: 'exspy holospy lumispy pyxem atomap' EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} + PIP_EXTRAS: '[all,tests]' USE_CONDA: false From 76053cf32d6bacff242c545cbd9fc5bfa7034b62 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Mon, 21 Jul 2025 10:16:44 +0100 Subject: [PATCH 07/10] Use `numpy-quaternion` orix optional dependency as a workaround to fix segmentation fault issue in orix --- .github/workflows/integration_tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a2359981d..c0fabc97b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -25,5 +25,9 @@ jobs: EXTENSIONS: 'exspy holospy lumispy pyxem atomap' EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} + # Use `numpy-quaternion` orix optional dependency as a workaround to fix + # segmentation fault issue in orix, which occurs when numpy-quaternion is + # not installed - reason unknown. + ADDITIONAL_PACKAGES: 'numpy-quaternion' PIP_EXTRAS: '[all,tests]' USE_CONDA: false From 6a6edb6ef157c6a1ed63c05d6ba23d6bc54aae49 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Mon, 21 Jul 2025 16:42:04 +0100 Subject: [PATCH 08/10] Add kikuchipy and gui to integration tests --- .github/workflows/integration_tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c0fabc97b..2159ef37b 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -1,7 +1,10 @@ name: Integration tests on: + pull_request_review: + types: [submitted, edited] pull_request: + types: [labeled, ready_for_review, reopened] push: branches-ignore: - 'dependabot/**' @@ -20,9 +23,9 @@ jobs: # Use the "reusable workflow" from the hyperspy organisation uses: hyperspy/.github/.github/workflows/integration_tests.yml@main with: - # don't run etspy until test suite is fixed - # EXTENSIONS: 'exspy holospy lumispy pyxem atomap etspy' - EXTENSIONS: 'exspy holospy lumispy pyxem atomap' + # don't run etspy until test suite is fixed + # EXTENSIONS: 'exspy holospy lumispy pyxem atomap kikuchipy hyperspy-gui-ipywidgets hyperspy-gui-traitsui etspy' + EXTENSIONS: 'exspy holospy lumispy pyxem atomap kikuchipy hyperspy-gui-ipywidgets hyperspy-gui-traitsui' EXTENSION_VERSION: ${{ matrix.EXTENSION_VERSION }} HYPERSPY_VERSION: ${{ matrix.HYPERSPY_VERSION }} # Use `numpy-quaternion` orix optional dependency as a workaround to fix From 2dfb97d93580f416ed34a58a7c3c90181f0d42ad Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Mon, 21 Jul 2025 16:42:52 +0100 Subject: [PATCH 09/10] Run workflow on label --- .github/workflows/integration_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2159ef37b..98d04e428 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -4,7 +4,6 @@ on: pull_request_review: types: [submitted, edited] pull_request: - types: [labeled, ready_for_review, reopened] push: branches-ignore: - 'dependabot/**' @@ -13,7 +12,7 @@ on: jobs: integration_test: - # if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') || github.event_name == 'workflow_dispatch' }} name: hs_${{ matrix.HYPERSPY_VERSION }}-ext_${{ matrix.EXTENSION_VERSION }} strategy: fail-fast: false From 5c06b78b61c3d59a24d865e960709b20f174af5c Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Mon, 21 Jul 2025 18:14:27 +0100 Subject: [PATCH 10/10] Add changelog entry --- upcoming_changes/426.maintenance.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 upcoming_changes/426.maintenance.rst diff --git a/upcoming_changes/426.maintenance.rst b/upcoming_changes/426.maintenance.rst new file mode 100644 index 000000000..04f9a38a2 --- /dev/null +++ b/upcoming_changes/426.maintenance.rst @@ -0,0 +1 @@ +Add integration tests to run the test suites of software in the HyperSpy ecosystem. \ No newline at end of file