Skip to content

Bump mongoose from 5.13.15 to 5.13.20 #1206

Bump mongoose from 5.13.15 to 5.13.20

Bump mongoose from 5.13.15 to 5.13.20 #1206

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
should_run_tests:
name: Should run tests
runs-on: ubuntu-latest
outputs:
shouldRunTests: ${{ env.SHOULD_RUN_TESTS }}
steps:
- uses: dorny/paths-filter@v2
id: filter
if: github.event_name == 'pull_request'
with:
filters: |
shouldRunTests:
- '!{{website,docs,examples}/**,**/*.md}'
- run: echo "SHOULD_RUN_TESTS=$SHOULD_RUN" >> $GITHUB_ENV
if: github.event_name == 'pull_request'
env:
SHOULD_RUN: ${{ steps.filter.outputs.shouldRunTests }}
- run: echo "SHOULD_RUN_TESTS=true" >> $GITHUB_ENV
if: github.event_name != 'pull_request'
api-tests:
name: API Tests
needs: should_run_tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: keystone5
POSTGRES_PASSWORD: k3yst0n3
POSTGRES_DB: test_db
ports:
- 5432:5432
env:
DATABASE_URL: 'postgres://keystone5:k3yst0n3@localhost:5432/test_db'
strategy:
fail-fast: false
matrix:
index: [0, 1, 2, 3, 4, 5, 6, 7, 8]
adapter: ['mongoose', 'knex', 'prisma_postgresql']
steps:
- name: Checkout Repo
uses: actions/checkout@v2
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- name: Setup Node.js 14.x
uses: actions/setup-node@main
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
with:
node-version: 14.x
- name: Get yarn cache directory path
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-yarn-v4-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v4-
- name: Install Dependencies
run: yarn
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- name: Unit tests
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
run: yarn jest --ci --maxWorkers=1 api-tests
env:
CLOUDINARY_CLOUD_NAME: keystone-cloudinary
CLOUDINARY_KEY: 758252673115372
CLOUDINARY_SECRET: ${{ secrets.CLOUDINARY_SECRET }}
CI_NODE_TOTAL: 9
CI_NODE_INDEX: ${{ matrix.index }}
TEST_ADAPTER: ${{ matrix.adapter }}
IFRAMELY_API_KEY: ${{ secrets.IFRAMELY_API_KEY }}
UNSPLASH_KEY: ${{ secrets.UNSPLASH_KEY}}
UNSPLASH_SECRET: ${{ secrets.UNSPLASH_SECRET}}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
non-api-tests:
name: Package Unit Tests
needs: should_run_tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: keystone5
POSTGRES_PASSWORD: k3yst0n3
POSTGRES_DB: test_db
ports:
- 5432:5432
env:
DATABASE_URL: 'postgres://keystone5:k3yst0n3@localhost:5432/test_db'
strategy:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@main
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-yarn-v4-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v4-
- name: Install Dependencies
run: yarn
- name: Unit tests
run: yarn jest --ci --maxWorkers=1 --testPathIgnorePatterns=api-tests
env:
CLOUDINARY_CLOUD_NAME: keystone-cloudinary
CLOUDINARY_KEY: 758252673115372
CLOUDINARY_SECRET: ${{ secrets.CLOUDINARY_SECRET }}
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@main
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-yarn-v4-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v4-
- name: Install Dependencies
run: yarn
- name: Prettier
run: yarn lint:prettier
- name: TypeScript
run: yarn lint:types
- name: ESLint
run: yarn lint:eslint
- name: Preconstruct
run: yarn build
- name: Remark
run: yarn lint:markdown
cypress:
name: Cypress tests
needs: should_run_tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: keystone5
POSTGRES_PASSWORD: k3yst0n3
POSTGRES_DB: test_db
ports:
- 5432:5432
env:
DATABASE_URL: 'postgres://keystone5:k3yst0n3@localhost:5432/test_db'
CLOUDINARY_CLOUD_NAME: $CLOUDINARY_CLOUD_NAME
CLOUDINARY_KEY: $CLOUDINARY_KEY
CLOUDINARY_SECRET: $CLOUDINARY_SECRET
PORT: 3000
strategy:
fail-fast: false
matrix:
project:
- test-projects/basic
- test-projects/login
- test-projects/access-control
- test-projects/client-validation
steps:
- name: Checkout Repo
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@main
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-yarn-v4-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v4-
- name: Install Dependencies
run: yarn
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- run: yarn --cwd tests/${{ matrix.project }} cypress install
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- run: yarn --cwd tests/${{ matrix.project }} cypress:run:ci
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: cypress/videos