Skip to content

Commit

Permalink
mark api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Oct 24, 2023
1 parent aabb6c1 commit 585436d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
run: cd python && pip install -e .
- name: Install packages needed for tests
run: pip install pytest pytest-asyncio pytest-cov boto3 kachery_cloud
- name: Run non-api tests
run: cd python && pytest -m "not api" tests/ # make sure we are not depending on any of the additional packages in requirements.txt
- name: Install packages needed for api tests
run: pip install -r requirements.txt
- name: Run tests and collect coverage
run: cd python && pytest --cov protocaas --cov-report=xml --cov-report=term tests/
- uses: codecov/codecov-action@v3
Expand Down
3 changes: 3 additions & 0 deletions python/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
markers =
api: tests for api that require the api packages to be installed
1 change: 1 addition & 0 deletions python/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


@pytest.mark.asyncio
@pytest.mark.api
async def test_api():
from protocaas.api_helpers.routers.gui.project_routes import create_project, CreateProjectRequest
from protocaas.api_helpers.routers.gui.project_routes import set_project_name, SetProjectNameRequest
Expand Down

0 comments on commit 585436d

Please sign in to comment.