[Snyk] Security upgrade mongoose from 6.10.4 to 8.0.0 #87
This file contains 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: test & release | |
# Run the workflow when a Pull Request is opened or when changes are pushed to master | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- feature/githubaction | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Run the steps below with the following versions of Node.js | |
node-version: [12.x, 14.x, 16.x, 18.x] | |
services: | |
neo4j: | |
image: neo4j | |
ports: | |
- 7474:7474 | |
- 7687:7687 | |
env: | |
NEO4J_AUTH: neo4j/new | |
NEO4J_dbms_connector_http_advertised__address: "neo4j:7474" | |
NEO4J_dbms_connector_bolt_advertised__address: "neo4j:7687" | |
NEO4J_dbms_security_auth__minimum__password__length: 3 | |
steps: | |
# Fetch the latest commit | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup Node.js using the appropriate version | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 4.2 | |
# Install package dependencies | |
- name: Install | |
run: npm i -f | |
# Run tests | |
- name: Test | |
run: npm run test-ci | |
env: | |
NEO_URI: neo4j://localhost:7687 | |
NEO_USER: neo4j | |
NEO_PASS: new | |
release-dry: | |
if: github.ref != 'refs/heads/master' | |
runs-on: ubuntu-latest | |
needs: [test] | |
services: | |
neo4j: | |
image: neo4j | |
ports: | |
- 7474:7474 | |
- 7687:7687 | |
env: | |
NEO4J_AUTH: neo4j/new | |
NEO4J_dbms_connector_http_advertised__address: "neo4j:7474" | |
NEO4J_dbms_connector_bolt_advertised__address: "neo4j:7687" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 4.2 | |
- name: Install | |
run: npm i -f | |
- name: Release (dry) | |
run: npm run semantic-release-dry | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
NEO_URI: neo4j://localhost:7687 | |
NEO_USER: neo4j | |
NEO_PASS: new | |
# ------------------------------------------------------------- | |
# Release | |
# ------------------------------------------------------------- | |
release: | |
# Only release on push to master | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
# Waits for test jobs for each Node.js version to complete | |
needs: [test] | |
services: | |
neo4j: | |
image: neo4j | |
ports: | |
- 7474:7474 | |
- 7687:7687 | |
env: | |
NEO4J_AUTH: neo4j/new | |
NEO4J_dbms_connector_http_advertised__address: "neo4j:7474" | |
NEO4J_dbms_connector_bolt_advertised__address: "neo4j:7687" | |
NEO4J_dbms_security_auth__minimum__password__length: 3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 4.2 | |
- name: Install | |
run: npm i -f | |
- name: Release | |
run: npm run semantic-release && npm run coveralls | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
NEO_URI: neo4j://localhost:7687 | |
NEO_USER: neo4j | |
NEO_PASS: new |