Skip to content

Bump mongoose from 6.12.1 to 8.0.0 #171

Bump mongoose from 6.12.1 to 8.0.0

Bump mongoose from 6.12.1 to 8.0.0 #171

Workflow file for this run

name: PR check
on:
workflow_dispatch:
# Trigger analysis when pushing in master or pull requests,
# and when creating a pull request.
push:
branches:
- master
- feature*
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
name: Coverage
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
strategy:
matrix:
node-version: [16.x, 18.x]
mongoose-version: [[email protected], [email protected]]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Installing dependencies
run: npm ci
- name: Installing ${{ matrix.mongoose-version }}
run: npm i ${{ matrix.mongoose-version }}
- name: Coverage
run: npm run test
env:
# The hostname used to communicate with the Redis service container
REDIS_HOST: localhost
# The default Redis port
REDIS_PORT: 6379
sonar:
name: Coverage & Sonar
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Installing dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Coverage
run: npm run test
env:
# The hostname used to communicate with the Redis service container
REDIS_HOST: localhost
# The default Redis port
REDIS_PORT: 6379
- name: Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=ilovepixelart
-Dsonar.projectName=ts-cache-mongoose
-Dsonar.projectKey=ilovepixelart_ts-cache-mongoose
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.sources=src
-Dsonar.tests=tests
-Dsonar.test.exclusions=tests/**
-Dsonar.coverage.exclusions=tests/**