Skip to content

Create codeql.yml

Create codeql.yml #7

Workflow file for this run

name: Node.js CI with Docker
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm install
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 14
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 4.4
- name: Install dependencies
run: npm install
- name: Install jest globally
run: npm i -g jest
- name: Copy .env.testing content to .env
run: cp .env.testing .env
- name: Run tests
run: npm run test