Skip to content
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

Test on macOS 13 and 14 #2249

Merged
merged 4 commits into from
Mar 21, 2024
Merged

Conversation

matrss
Copy link
Collaborator

@matrss matrss commented Feb 27, 2024

Adds a GitHub Actions workflow to test on macOS 13 and 14 runners, i.e. Intel-based and Apple silicon-based runners.

Split of from #2207. Fixes #2284, fixes #2285.

@matrss matrss force-pushed the test-on-apple-silicon branch 3 times, most recently from 64f9d86 to fc502c8 Compare March 1, 2024 16:28
@matrss matrss force-pushed the test-on-apple-silicon branch 19 times, most recently from 563e953 to 5e1c5a0 Compare March 19, 2024 10:44
@matrss
Copy link
Collaborator Author

matrss commented Mar 19, 2024

I had to disable a few tests and three whole files to get the test suite to pass consistently, but the tests that do run still add up to ~64% coverage. To ensure that this is somewhat reliable I've again ran the test suite 50 times, half in normal order and the other half in reverse, which all passed without issue (see: https://github.com/Open-MSS/MSS/actions/runs/8340807936/job/22825515984).

I think this is ready to get merged as a starting point for testing on different platforms. I would like this workflow to become one unified testing workflow for all platforms, which is why I've included running on ubuntu-latest as well. I will try to add Intel-based macOS and Windows to it in future PRs.

# Even a module level skip is not enough, they need to be completely ignored.
# TODO: fix those tests and drop the ignores
run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib
--ignore=tests/_test_msui/test_sideview.py --ignore=tests/_test_msui/test_topview.py --ignore=tests/_test_msui/test_wms_control.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this 20 a total time? and what happens when the tests timeout of 10 is reached?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While debugging a test I recently had seen that it sometimes gets into the http_auth dialog but that is not defined. It is not reproducable, it then enters the password there and fails ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 20 just means "print the duration of the 20 slowest tests". I copied that over from the other testing workflow. If the 10 minute step timeout is reached the workflow is aborted and marked as failed.

Yes, there are still some flaky tests left. The files that are disabled here seem to cause at least some of that, since I have seen the same symptoms that they exhibit on macOS also happen on Linux, just much less frequently which is why it isn't much of a problem in the other workflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I've increased the step timeout because the macOS 13 runners are a bit slower than the macOS 14 ones.

@@ -6,7 +6,7 @@ log_file = pytest.log
log_file_level = DEBUG
log_file_format = %(asctime)s %(levelname)s %(message)s
log_file_date_format = %Y-%m-%d %H:%M:%S
timeout = 30
timeout = 60
filterwarnings =
# These namespaces are declared in a way not conformant with PEP420. Not much we can do about that here, we should keep an eye on when this is fixed in our dependencies though.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is unrelated to this PR and there is an issue for it already: #1919. As mentioned there it seems like the real culprit is PyFilesystem2.

@matrss
Copy link
Collaborator Author

matrss commented Mar 20, 2024

I am considering merging #2288 into this PR, since that is just a single line change. I initially thought that Intel-based macOS would require more changes, but it turned out that it doesn't.

@matrss matrss marked this pull request as draft March 21, 2024 09:09
@matrss matrss force-pushed the test-on-apple-silicon branch from 5e1c5a0 to a360358 Compare March 21, 2024 09:14
@matrss matrss changed the title Test on Apple silicon Test on macOS 13 and 14 Mar 21, 2024
@matrss matrss force-pushed the test-on-apple-silicon branch from a360358 to 3c8fdd9 Compare March 21, 2024 09:33
matrss added 4 commits March 21, 2024 10:54
The macOS 13 runners use Intel processors while the macOS 14 runners use
Apple's ARM processors.
The test_tutorial_dir seems to be able to run into a 30 second timeout
under normal operation on the macOS 14 runners, so this increases the
timeout a bit to accommodate.
@matrss matrss force-pushed the test-on-apple-silicon branch from 3c8fdd9 to 47d6eb6 Compare March 21, 2024 09:55
@matrss matrss marked this pull request as ready for review March 21, 2024 10:09
@matrss
Copy link
Collaborator Author

matrss commented Mar 21, 2024

I've added Intel-based macOS to this PR now. It is a bit slower, but seems to run reliably as well. This is ready for review again.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@matrss matrss merged commit daf8f2a into Open-MSS:develop Mar 21, 2024
11 checks passed
@matrss matrss deleted the test-on-apple-silicon branch March 21, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a GitHub Actions workflow to test on Intel macOS Add a GitHub Actions workflow to test on ARM macOS
2 participants