From 6ef971bc09ba1e39fdcb23b3a89a57605fe2ddf4 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Tue, 12 Jan 2021 15:45:57 +0000 Subject: [PATCH 1/5] Add Windows, expect a test to fail due to screen size --- .github/workflows/test-with-edm.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index 68a44cf63..b3a8ba4ed 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -2,7 +2,7 @@ name: Test with EDM -on: pull_request +on: push env: INSTALL_EDM_VERSION: 3.2.1 @@ -15,9 +15,14 @@ jobs: test-with-edm: strategy: matrix: - os: [macos-latest] + os: [macos-latest, windows-latest] toolkit: ['pyqt', 'pyqt5', 'pyside2', 'wx'] runs-on: ${{ matrix.os }} + env: + # Set root directory for Windows, otherwise 'pip install ' + # complains because the Python environment is in C: drive whereas + # the source is checked out in D: drive. + EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm steps: - uses: actions/checkout@v2 - name: Cache EDM packages From 1643ad5e56bd4f0b495ff82669e0821245f187f7 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Tue, 12 Jan 2021 15:55:47 +0000 Subject: [PATCH 2/5] Remove unreliable assertion, it fails when the host machine is different --- enable/tests/test_component_editor.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/enable/tests/test_component_editor.py b/enable/tests/test_component_editor.py index efc9324ae..d3f88af41 100644 --- a/enable/tests/test_component_editor.py +++ b/enable/tests/test_component_editor.py @@ -57,9 +57,5 @@ def test_initial_component_with_item_size(self): size = get_dialog_size(ui.control) - # leave a few pixel of margin for wx self.assertGreater(size[0], ITEM_WIDTH-1) - self.assertLess(size[0], ITEM_WIDTH+30) - self.assertGreater(size[1], ITEM_HEIGHT-1) - self.assertLess(size[1], ITEM_HEIGHT+30) From 539d54b6c735f375f4f6cb43a72e8937d3f0a1c2 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Tue, 12 Jan 2021 15:56:10 +0000 Subject: [PATCH 3/5] Flip back to pull_request trigger --- .github/workflows/test-with-edm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index b3a8ba4ed..52cefef43 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -2,7 +2,7 @@ name: Test with EDM -on: push +on: pull_request env: INSTALL_EDM_VERSION: 3.2.1 From 0c731619a5683d306a3f070e4268760f66eb137c Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Tue, 12 Jan 2021 16:32:53 +0000 Subject: [PATCH 4/5] Improve comment --- .github/workflows/test-with-edm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index 52cefef43..aec4ada8d 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -19,7 +19,7 @@ jobs: toolkit: ['pyqt', 'pyqt5', 'pyside2', 'wx'] runs-on: ${{ matrix.os }} env: - # Set root directory for Windows, otherwise 'pip install ' + # Set root directory, mainly for Windows, otherwise 'pip install' # complains because the Python environment is in C: drive whereas # the source is checked out in D: drive. EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm From 6c3b51eb057c82c5ec1907f85ecb95912fe9b440 Mon Sep 17 00:00:00 2001 From: Kit Yan Choi Date: Tue, 12 Jan 2021 17:05:11 +0000 Subject: [PATCH 5/5] Clarify comment --- .github/workflows/test-with-edm.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index aec4ada8d..6ebef09b3 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -19,9 +19,10 @@ jobs: toolkit: ['pyqt', 'pyqt5', 'pyside2', 'wx'] runs-on: ${{ matrix.os }} env: - # Set root directory, mainly for Windows, otherwise 'pip install' - # complains because the Python environment is in C: drive whereas - # the source is checked out in D: drive. + # Set root directory, mainly for Windows, so that the EDM Python + # environment lives in the same drive as the cloned source. Otherwise + # 'pip install' raises an error while trying to compute + # relative path between the site-packages and the source directory. EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm steps: - uses: actions/checkout@v2