Skip to content

Commit

Permalink
[CI] Run integration tests within docker stack (#176)
Browse files Browse the repository at this point in the history
# Description
<!-- Please include a summary of the change(s) and which issue is being
fixed. Please provide as much detail as possible. -->
Run each `test` CI job within the `docker compose` stack to enable
integration tests to pass.

<!-- Replace `XXX` with the concerning issue number. The \"#\" links
this PR to its relevant issue -->
Closes #167

## How to Test
<!-- Provide some simple steps so that others can verify your
implementation -->
Observe the green checkmarks for CI jobs

## Checklist
- [x] The code includes tests if relevant
- [x] I have *actually* self-reviewed my changes and done QA
<!-- Only check this off if you have actually done a self-review! DO NOT
request any review from others until you have done your self-review! -->
  • Loading branch information
MNThomson authored Jun 14, 2024
1 parent 7071151 commit 0f3c9f7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 48 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/listing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci
- name: Docker Compose Up
run: docker compose up -d listing datalayer database

- name: Test
run: npm run test:ci
run: docker compose exec listing npm run test:ci

security:
name: Security
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci
- name: Docker Compose Up
run: docker compose up -d message datalayer database

- name: Test
run: npm run test:ci
run: docker compose exec message npm run test:ci

security:
name: Security
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/recommend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Docker Compose Up
run: docker compose up -d recommend datalayer database

- name: Test
run: pytest
run: docker compose exec recommend pytest

security:
name: Security
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci
- name: Docker Compose Up
run: docker compose up -d review datalayer database

- name: Test
run: npm run test:ci
run: docker compose exec review npm run test:ci

security:
name: Security
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Docker Compose Up
run: docker compose up -d search datalayer elasticsearch

- name: Test
run: pytest
run: docker compose exec search pytest

security:
name: Security
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci
- name: Docker Compose Up
run: docker compose up -d user datalayer database

- name: Test
run: npm run test:ci
run: docker compose exec user npm run test:ci

security:
name: Security
Expand Down

0 comments on commit 0f3c9f7

Please sign in to comment.