Skip to content

Commit

Permalink
add test run
Browse files Browse the repository at this point in the history
  • Loading branch information
janishar committed Dec 23, 2022
1 parent 68103bd commit bf6f744
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/docker_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env
run: cp .env.example .env
- name: Create public.pem
run: cp keys/public.pem.example keys/public.pem
- name: Create private.pem
run: cp keys/private.pem.example keys/private.pem
- name: Create tests .env
run: cp tests/.env.test.example tests/.env.test
- name: Build docker images
run: docker-compose build -d
- name: Enter node app container
run: docker exec -it app bash
run: docker-compose build
- name: Run docker images
run: docker-compose up -d
- name: Run tests
run: npm test
run: docker exec -t app npm test
- name: Clean up
if: success() || failure()
run: docker-compose down --rmi all -v --remove-orphans
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Node.js Backend Architecture Typescript Project
### A complete project to build a blogging platform like Medium, and FreeCodeCamp

[![Docker Compose CI](https://github.com/janishar/nodejs-backend-architecture-typescript/actions/workflows/docker_compose.yml/badge.svg)](https://github.com/janishar/nodejs-backend-architecture-typescript/actions/workflows/docker_compose.yml)

Note: This is the **latest (version 2)** of the project. If you are using **version 1** then checkout the branch [**version-1**](https://github.com/janishar/nodejs-backend-architecture-typescript/tree/version-1)

<p align="center">
Expand Down

0 comments on commit bf6f744

Please sign in to comment.