add moment library to package.json and package-lock.json #556
Workflow file for this run
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
| on: | |
| # Elements that trigger the workflow | |
| push: | |
| branches: | |
| - '*' # Runs on all branches | |
| pull_request: | |
| branches: | |
| - '*' # Runs on all branches | |
| jobs: | |
| # Define a job "build" | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| # set up express server | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '18' | |
| # Inject environment variables (MongoDB Atlas & Firebase connections) | |
| - name: Create .env file | |
| run: | | |
| echo "DB_CONN_STRING=${{ secrets.DB_CONN_STRING }}" >> chathaven/.env | |
| echo "DB_NAME=chatHavenDB" >> chathaven/.env | |
| echo "PORT=3000" >> chathaven/.env | |
| echo "FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> chathaven/.env | |
| echo "GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}" >> chathaven/.env # Add this line | |
| # Install backend dependencies | |
| - name: Install backend dependencies | |
| working-directory: ./chathaven/backend | |
| run: npm ci | |
| # Install frontend dependencies | |
| - name: Install frontend dependencies | |
| working-directory: ./chathaven/frontend | |
| run: npm ci | |
| # # Run backend tests | |
| - name: Run Jest Unit Tests | |
| working-directory: ./chathaven/backend | |
| run: npm test |