Skip to content

Commit

Permalink
Merge pull request #32 from rudemex/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rudemex authored Jul 3, 2024
2 parents f3fbf80 + bc760c8 commit 14da014
Show file tree
Hide file tree
Showing 32 changed files with 2,156 additions and 351 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Setup"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
needs: setup
name: "Build"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "💾 Restore packages from cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down Expand Up @@ -72,13 +72,15 @@ jobs:
NODE_ENV: 'test'

- name: "📊 Publish Test Report"
uses: mikepenz/action-junit-report@v3
if: always()
uses: dorny/test-reporter@v1
if: success() || failure()
with:
report_paths: '**/junit.xml'
name: "Test Report"
path: './junit.xml'
reporter: jest-junit

- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Setup"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
needs: setup
name: "Build"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "💾 Restore packages from cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down Expand Up @@ -78,13 +78,15 @@ jobs:
NODE_ENV: 'test'

- name: "📊 Publish Test Report"
uses: mikepenz/action-junit-report@v3
if: always()
uses: dorny/test-reporter@v1
if: success() || failure()
with:
report_paths: '**/junit.xml'
name: "Test Report"
path: './junit.xml'
reporter: jest-junit

- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Setup"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
needs: setup
name: "Build"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "💾 Restore packages from cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down Expand Up @@ -78,13 +78,15 @@ jobs:
NODE_ENV: 'test'

- name: "📊 Publish Test Report"
uses: mikepenz/action-junit-report@v3
if: always()
uses: dorny/test-reporter@v1
if: success() || failure()
with:
report_paths: '**/junit.xml'
name: "Test Report"
path: './junit.xml'
reporter: jest-junit

- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Setup"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
needs: setup
name: "Build"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "💾 Restore packages from cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down Expand Up @@ -73,13 +73,15 @@ jobs:
NODE_ENV: 'test'

- name: "📊 Publish Test Report"
uses: mikepenz/action-junit-report@v3
if: always()
uses: dorny/test-reporter@v1
if: success() || failure()
with:
report_paths: '**/junit.xml'
name: "Test Report"
path: './junit.xml'
reporter: jest-junit

- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Setup"
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

release:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18.17.0' ]
node: [ '18.20.3' ]
name: "Release"
needs: setup
steps:
- name: "⚙ Set up Node.js v${{ matrix.node }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: "✅ Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "💾 Restore Dependencies from cache"
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand Down Expand Up @@ -85,13 +85,15 @@ jobs:
NODE_ENV: 'test'

- name: "📊 Publish Test Report"
uses: mikepenz/action-junit-report@v3
if: always()
uses: dorny/test-reporter@v1
if: success() || failure()
with:
report_paths: '**/junit.xml'
name: "Test Report"
path: './junit.xml'
reporter: jest-junit

- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# docker build -t nestjs-starter .

# Build with ARG
# docker build --build-arg NODE_VERSION=16.14.2 --build-arg APP_PORT=3000 --build-arg IMAGE_NAME=my-nestjs-app -t mi-imagen .
# docker build --build-arg NODE_VERSION=18.20.3-alpine3.18 --build-arg APP_PORT=3000 --build-arg IMAGE_NAME=my-nestjs-app -t mi-imagen .

# Run
# docker run -d -p 8080:8080 --name nestjs-starter-app --env-file .env nestjs-starter
Expand All @@ -19,13 +19,13 @@



ARG NODE_VERSION=18.17.0
ARG NODE_VERSION=18.20.3-alpine3.18
ARG NODE_ENV=build
ARG APP_PORT=8080
ARG IMAGE_NAME=nestjs-starter

# Utiliza una versión ligera de Node.js como imagen base
FROM node:${NODE_VERSION}-alpine as builder
FROM node:${NODE_VERSION} as builder
# Establece la variable de entorno NODE_ENV a partir del ARG
ENV NODE_ENV=${NODE_ENV}

Expand All @@ -47,7 +47,7 @@ RUN yarn build
# ---

# Comienza una nueva etapa para reducir el tamaño de la imagen final
FROM node:${NODE_VERSION}-alpine
FROM node:${NODE_VERSION}
# Información sobre la imagen, con el valor de la etiqueta name parametrizado
LABEL name=${IMAGE_NAME}

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
</div>

<p align="center">
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NodeJS&message=v18.17.0&labelColor=339933&color=757575&logoColor=FFFFFF&logo=Node.js" alt="Node.js"/>
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NPM&message=v9.6.7&labelColor=CB3837&logoColor=FFFFFF&color=757575&logo=npm" alt="Npm"/>
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NestJS&message=v10.3.0&labelColor=E0234E&logoColor=FFFFFF&color=757575&logo=Nestjs" alt="NestJs"/>
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NodeJS&message=v18.20.3&labelColor=339933&color=757575&logoColor=FFFFFF&logo=Node.js" alt="Node.js"/>
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NPM&message=v10.8.1&labelColor=CB3837&logoColor=FFFFFF&color=757575&logo=npm" alt="Npm"/>
<img src="https://img.shields.io/static/v1.svg?style=flat&label=NestJS&message=v10.3.10&labelColor=E0234E&logoColor=FFFFFF&color=757575&logo=Nestjs" alt="NestJs"/>
<a href="https://github.com/rudemex/nestjs-starter/releases/latest">
<img alt="Last Release" src="https://img.shields.io/github/v/tag/rudemex/nestjs-starter?label=release">
</a>
Expand Down Expand Up @@ -87,10 +87,10 @@ Reduce exposición de datos sensibles. El BFF contiene API's que filtran estos d

## 📝 Requerimientos básicos

- Node.js v18.17.0 or higher ([Download](https://nodejs.org/es/download/))
- YARN v1.22.18 or higher
- NPM v9.6.7 or higher
- NestJS v10.3.0 or higher ([Documentación](https://nestjs.com/))
- Node.js v18.20.3 or higher ([Download](https://nodejs.org/es/download/))
- YARN v1.22.22 or higher
- NPM v10.8.1 or higher
- NestJS v10.3.10 or higher ([Documentación](https://nestjs.com/))

<a name="install-dependencies"></a>

Expand Down
Loading

0 comments on commit 14da014

Please sign in to comment.