Skip to content

Docs/swagger

Docs/swagger #22

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: ['main', 'CI_CD']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
mongodb-version: [8.0]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- run: |
echo "TZ=UTC" >> .env
echo "PORT=8000" >> .env
echo "HOST=localhost" >> .env
echo "LOG_LEVEL=info" >> .env
echo "NODE_ENV=development" >> .env
echo "SESSION_DRIVER=cookie" >> .env
echo "MONGO_URI=mongodb://localhost:27017/citium" >> .env
echo "JWT_SECRET=$(openssl rand -base64 32)" >> .env
- run: npm ci
- run: node ace generate:key
- run: node ace test --force-exit