Skip to content

Commit

Permalink
Use python-sdk make test target to run all python-sdk tests
Browse files Browse the repository at this point in the history
`make test` command now provides full official set of unit and
integration tests for python-sdk. They can be started using the
command during development and in CI. This is why PR template is
updated with the command and GitHub CI actions run it now.

Also use `make build` command instead of calling `poetry install`
exlicitly in CI because `make build` is a source of truth command
for building of python-sdk (it runs `poetry install` too).
  • Loading branch information
eabatalov committed Nov 22, 2024
1 parent 674610f commit f26fdf1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ You can run the tests manually:
Notes:
- Tests can be run manually: in `python-sdk/`, run the run `pip install -e .`,
start the server and executor, and run `python test_graph_behaviours.py`.
- Tests can be run manually: start the server and executor, `cd python-sdk`,
run `make test`.
- To test if changes to the server are backward compatible with the latest
release, label the PR with `ci_compat_test`. This might report failures
unrelated to your change if previous incompatible changes were pushed without
Expand Down
44 changes: 10 additions & 34 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
with:
python-version: 3.11
cache: 'poetry'
- name: Install python dependencies
- name: Build python-sdk
run: |
cd python-sdk
poetry install
make build
- name: Lint python-sdk
run: |
cd python-sdk
Expand All @@ -101,10 +101,10 @@ jobs:
with:
python-version: 3.11
cache: 'poetry'
- name: Install python dependencies
- name: Build python-sdk
run: |
cd python-sdk
poetry install
make build
- name: Lint python-sdk
run: |
cd python-sdk
Expand Down Expand Up @@ -159,23 +159,11 @@ jobs:
fi
done
- name: Run Acceptance Tests (graph behaviours)
- name: Run All Tests
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_behaviours.py
- name: Run Acceptance Tests (update)
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_update.py
- name: Run Acceptance Tests (validation)
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_validation.py
make test
last_release_acceptance_tests:
name: 'Last Release Acceptance Tests (trigger with label: ci_compat_test)'
Expand All @@ -200,10 +188,10 @@ jobs:
with:
python-version: 3.11
cache: 'poetry'
- name: Install python dependencies
- name: Build python-sdk
run: |
cd python-sdk
poetry install
make build
- name: Start Background Indexify Server
uses: JarvusInnovations/background-action@v1
with:
Expand Down Expand Up @@ -254,20 +242,8 @@ jobs:
fi
done
- name: Run Acceptance Tests (graph behaviours)
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_behaviours.py
- name: Run Acceptance Tests (update)
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_update.py
- name: Run Acceptance Tests (validation)
- name: Run All Tests
run: |
cd python-sdk
export INDEXIFY_URL=http://localhost:8900
poetry run python tests/test_graph_validation.py
make test

0 comments on commit f26fdf1

Please sign in to comment.