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

Remove marker for cpu test, add marker for future gpu tests #128

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

thejaminator
Copy link
Collaborator

This PR removes the pytest.mark.cpu decorators, so all tests are automatically added to the CI.

For future tests that require the GPU, they can be marked with pytest.mark.gpu instead. These tests won't run on the cpu CI

- name: Run CPU Tests
run: pytest -m cpu
- name: Run normal tests, excluding GPU tests
run: pytest -m "not gpu"
Copy link
Collaborator Author

@thejaminator thejaminator Mar 15, 2023

Choose a reason for hiding this comment

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

this other PR allows us to stop having to edit both pipelines
#129

This is just an example test to show how to use the `gpu` mark
We'll need to implement a GPU runner in the CI for actual GPU tests
GPU tests can be run with `pytest -m gpu`"""
assert True
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this test won't run because we don't have an actual gpu runner, but i'm just leaving it here to document the pytest.mark.gpu decorator. otherwise the CI doing pytest -m "not gpu" is pretty weird

Copy link
Member

@norabelrose norabelrose left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@norabelrose norabelrose merged commit 62bc2b4 into main Mar 15, 2023
@norabelrose norabelrose deleted the remove-cpu-tests branch March 15, 2023 20:44
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.

2 participants