From dadcbc6f407cd3e9205322c0dd91ed55022891c7 Mon Sep 17 00:00:00 2001 From: Arman Jahanpour <77515879+rmanaem@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:02:13 -0400 Subject: [PATCH] [MNT] Updated `compatibility.yaml` file and e2e tests (#78) * 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 215adcd893ed6f3612fcfca126eda7e857999a8c. * 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 --- .github/workflows/compatibility.yaml | 12 +++++++++++- README.md | 7 +++++++ cypress/e2e/simple-test.cy.js | 4 ++-- docker-compose.yml | 6 +++--- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compatibility.yaml b/.github/workflows/compatibility.yaml index 68a5c34..7b7df54 100644 --- a/.github/workflows/compatibility.yaml +++ b/.github/workflows/compatibility.yaml @@ -1,4 +1,4 @@ -name: Compatibility of +name: Tool version compatibility test on: workflow_dispatch: @@ -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: . @@ -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: | diff --git a/README.md b/README.md index 83eda9c..90fb8c7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ +
+ # recipes Configuration files for a Neurobagel deployment. + + Tool version compatibility test + +
+ ## 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/). diff --git a/cypress/e2e/simple-test.cy.js b/cypress/e2e/simple-test.cy.js index 8498cfb..7456990 100644 --- a/cypress/e2e/simple-test.cy.js +++ b/cypress/e2e/simple-test.cy.js @@ -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); }); diff --git a/docker-compose.yml b/docker-compose.yml index d04fb37..00751fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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" @@ -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" @@ -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"