docs: Revise README formatting and content for clarity #9
This file contains hidden or 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
| name: Auth Mailer API CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| # Esto le dice a GitHub que entre a la carpeta email-api para ejecutar todo | |
| defaults: | |
| run: | |
| working-directory: email-api | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_USER: user_test | |
| POSTGRES_PASSWORD: password_test | |
| POSTGRES_DB: auth_mailer_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| # Aquí también ajustamos la ruta del lock file | |
| cache-dependency-path: email-api/package-lock.json | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run Tests | |
| env: | |
| DATABASE_URL: postgres://user_test:password_test@localhost:5432/auth_mailer_test | |
| SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
| SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | |
| EMAIL: ${{ secrets.EMAIL }} | |
| NODE_ENV: test | |
| run: npm test |