-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21473ad
commit c4a5328
Showing
3 changed files
with
25 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# .github/workflows/test.yml | ||
|
||
name: Test Workflow | ||
|
||
on: | ||
|
@@ -9,43 +8,11 @@ on: | |
description: "Path to the application directory" | ||
required: true | ||
type: string | ||
node_version: | ||
description: "Node.js version to use" | ||
required: true | ||
type: string | ||
cache_dependency_path: | ||
description: "Path to the package-lock.json file" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
cache: "npm" | ||
cache-dependency-path: ${{ inputs.cache_dependency_path }} | ||
|
||
- name: Install Dependencies | ||
run: npm install --force | ||
working-directory: ${{ inputs.app_path }} | ||
|
||
- name: Run Tests | ||
run: npm run test | ||
working-directory: ${{ inputs.app_path }} | ||
|
||
- name: Upload Code Coverage | ||
if: ${{ secrets.CC_TEST_REPORTER_ID != '' }} | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run test:cov | ||
working-directory: ${{ inputs.app_path }} | ||
- uses: actions/checkout@v4 | ||
- run: docker compose -f ${{ inputs.app_path }}/docker-compose.test.yml up --exit-code-from app |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
version: "3.9" | ||
version: '3.9' | ||
|
||
services: | ||
nginx: | ||
container_name: nginx | ||
image: nginx:latest | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- ./nginx/templates:/etc/nginx/templates:ro | ||
- ./nginx/ssl:/etc/ssl:ro | ||
env_file: | ||
- ./.env.nginx | ||
depends_on: | ||
- app | ||
nginx: | ||
container_name: nginx | ||
image: nginx:latest | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- ./nginx/templates:/etc/nginx/templates:ro | ||
- ./nginx/ssl:/etc/ssl:ro | ||
env_file: | ||
- ./.env.nginx | ||
depends_on: | ||
- app | ||
|
||
app: | ||
build: | ||
context: . | ||
target: production | ||
dockerfile: Dockerfile | ||
env_file: | ||
- .env | ||
app: | ||
build: | ||
context: . | ||
target: production | ||
dockerfile: Dockerfile | ||
env_file: | ||
- .env |