Skip to content

Commit

Permalink
[MNT] Updated compatibility.yaml file and e2e tests (#78)
Browse files Browse the repository at this point in the history
* Fixed trailing slash

* Fixed trailing slash in the name

* Fixed the query param

* Set up cypress screenshots

* Revert "Set up cypress screenshots"

This reverts commit 215adcd.

* Modify `NB_API_QUERY_URL` in the `compatibility.yaml`

* Updated nightly job

* Renamed workflow name

* Added `Tool version compatibility test` badge to README.md

* Fixed the README.md
  • Loading branch information
rmanaem authored Aug 12, 2024
1 parent 9559390 commit dadcbc6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/compatibility.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compatibility of
name: Tool version compatibility test

on:
workflow_dispatch:
Expand All @@ -18,6 +18,11 @@ jobs:
run: |
cp template.env .env
cp local_nb_nodes.template.json local_nb_nodes.json
- name: Edit NB_API_QUERY_URL env var
working-directory: .
run: |
sed -i 's|^NB_API_QUERY_URL=.*|NB_API_QUERY_URL=http://localhost:8080|g' .env
- name: Run docker compose
working-directory: .
Expand Down Expand Up @@ -76,6 +81,11 @@ jobs:
cp local_nb_nodes.template.json local_nb_nodes.json
sed -i 's/latest/nightly/g' .env
- name: Edit NB_API_QUERY_URL env var
working-directory: .
run: |
sed -i 's|^NB_API_QUERY_URL=.*|NB_API_QUERY_URL=http://localhost:8080|g' .env
- name: Run docker compose
working-directory: .
run: |
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<div align="center">

# recipes
Configuration files for a Neurobagel deployment.

<a href="https://github.com/neurobagel/recipes/actions/workflows/compatibility.yaml">
<img src="https://img.shields.io/github/actions/workflow/status/neurobagel/query-tool/component-test.yaml?color=8FBC8F&label=Tool version compatibility test&style=flat-square" alt="Tool version compatibility test">
</a>
</div>

## How to use
For detailed instructions on deploying Neurobagel for your use case, see the official Neurobagel documentation on [setting up a local knowledge graph (node)](https://neurobagel.org/getting_started/) and [configuration options](https://neurobagel.org/config/).

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/simple-test.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ describe('Full stack e2e', () => {
cy.get('[data-cy="result-container"]').contains("from Local graph 1",{matchCase: false});
})
it('API', () => {
cy.request("localhost:8000/query/").as("query");
cy.request("localhost:8000/query").as("query");
cy.get("@query").should((response) => {
expect(response.status).to.eq(200);
});
});
it("Federation API", () => {
cy.request("localhost:8080/query/?node=http://api:8000/").as("query");
cy.request("localhost:8080/query?node_url=http://api:8000").as("query");
cy.get("@query").should((response) => {
expect(response.status).to.eq(200);
});
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

api:
image: "neurobagel/api:${NB_NAPI_TAG:-latest}"
image: "neurobagel/api:${NB_NAPI_TAG:-nightly}"
profiles:
- "local_node"
- "full_stack"
Expand Down Expand Up @@ -50,7 +50,7 @@ services:
- db_user_password

federation:
image: "neurobagel/federation_api:${NB_FAPI_TAG:-latest}"
image: "neurobagel/federation_api:${NB_FAPI_TAG:-nightly}"
profiles:
- "local_federation"
- "full_stack"
Expand All @@ -65,7 +65,7 @@ services:
NB_QUERY_CLIENT_ID: ${NB_QUERY_CLIENT_ID}

query_federation:
image: "neurobagel/query_tool:${NB_QUERY_TAG:-latest}"
image: "neurobagel/query_tool:${NB_QUERY_TAG:-nightly}"
profiles:
- "local_federation"
- "full_stack"
Expand Down

0 comments on commit dadcbc6

Please sign in to comment.