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

Refactor unit and integration tests and corresponding github actions #686

Merged
merged 16 commits into from
Dec 6, 2024

Conversation

alimanfoo
Copy link
Member

@alimanfoo alimanfoo commented Dec 4, 2024

This PR aims to make a clearer distinction between unit and integration tests, where unit tests run against local or simulated data, and integration tests run against real remote data in GCS.

  • Reorganise the tests to bring together all tests which run against data in GCS into a common tests/integration directory, both for Anopheles and Plasmodium.

  • The legacy_tests.yml action is renamed to integration_tests.yml and explicitly runs only those tests within the tests/integration directory.

  • The tests.yml and coverage.yml actions are updated to run all tests except those in the tests/integration directory.

  • Previously also we had a mixture of using poetry or pip to install the package and its dependencies in different actions. For simplicity this PR uses pip in all actions running tests or notebooks.

  • Ensure that mypy runs with the package and all its dependencies installed, for more comprehensive type checking, and fix or ignore additional typing errors that come up.

This lays some groundwork for #682 but doesn't resolve it.

@@ -186,7 +186,7 @@ def test_setup_returns_config_correctly(self):
self.assertEqual(
plasmodium.CONF,
{
"default_url": "gs://test_plasmodium_release/",
"default_url": "s3://test_plasmodium_release/",
Copy link
Member Author

Choose a reason for hiding this comment

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

This change ensures the tests don't try to access GCS within this test module (using a GCS URL triggers an attempt to authenticate, which then requires secrets, which then won't work on a PR from a fork).

Copy link
Collaborator

@leehart leehart left a comment

Choose a reason for hiding this comment

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

Thanks @alimanfoo

Copy link
Collaborator

@eselimnl eselimnl left a comment

Choose a reason for hiding this comment

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

Thanks for including s3fs @alimanfoo!

@alimanfoo alimanfoo merged commit ac45181 into master Dec 6, 2024
10 checks passed
@alimanfoo alimanfoo deleted the faster-ci-2024-12-04 branch December 6, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants