-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup e2e tests to be running in parallel by using Docker
Additionally: – add README for e2e tests – update env variables template – cleanup npm scripts
- Loading branch information
Showing
19 changed files
with
340 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:21.7.3 | ||
|
||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json files. This allows Docker to cache the | ||
# npm dependencies as long as these files don't change. | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
COPY post-install.sh ./ | ||
COPY docker ./docker | ||
RUN chmod +x ./post-install.sh | ||
RUN npm ci | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
# Run this command to keep container alive. Without it will be demounted right after deps installation | ||
CMD ["tail", "-f", "/dev/null"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
services: | ||
test-db: | ||
image: postgres:16 | ||
restart: always | ||
container_name: test-budget-tracker-db | ||
volumes: ['test_db_data:/var/lib/postgresql/data'] | ||
environment: | ||
- POSTGRES_USER=${APPLICATION_DB_USERNAME} | ||
- POSTGRES_PASSWORD=${APPLICATION_DB_PASSWORD} | ||
- POSTGRES_DB=${APPLICATION_DB_DATABASE} | ||
ports: ['${APPLICATION_DB_PORT}:5432'] | ||
env_file: ../../.env.test | ||
|
||
test-redis: | ||
image: redis:6 | ||
container_name: test-budget-tracker-redis | ||
volumes: ['test_redis_data:/data'] | ||
ports: ['6379:6379'] | ||
|
||
test-runner: | ||
build: | ||
context: ../.. | ||
dockerfile: docker/test/Dockerfile | ||
depends_on: | ||
- test-db | ||
- test-redis | ||
environment: | ||
- NODE_ENV=test | ||
env_file: ../../.env.test | ||
|
||
volumes: | ||
test_db_data: | ||
test_redis_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.