Skip to content

Commit

Permalink
feat: add MongoDB 5.1 compatibility (parse-community#7682)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and dblythy committed Jan 10, 2025
1 parent 5793d09 commit fff2db5
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 359 deletions.
266 changes: 99 additions & 167 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,159 +1,113 @@
name: ci
on:
push:
branches: [release, alpha, beta, next-major, 'release-[0-9]+.x.x']
branches: [ release, alpha, beta, next-major ]
pull_request:
branches:
- '**'
paths-ignore:
- '**/**.md'
env:
NODE_VERSION: 22.4.1
NODE_VERSION: 16.13.0
PARSE_SERVER_TEST_TIMEOUT: 20000
permissions:
actions: write
jobs:
check-code-analysis:
name: Code Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: src
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
check-ci:
name: Node Engine Check
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install prod dependencies
run: npm ci
- name: Remove dev dependencies
run: ./ci/uninstallDevDeps.sh @actions/core
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
check-lint:
name: Lint
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- run: npm run lint
check-definitions:
name: Check Definitions
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v4
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- name: CI Definitions Check
run: npm run ci:definitionsCheck
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
check-lint:
name: Lint
timeout-minutes: 15
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- run: npm run lint
check-circular:
name: Circular Dependencies
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- run: npm run madge:circular
name: Circular Dependencies
timeout-minutes: 5
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- run: npm run madge:circular
check-docker:
name: Docker Build
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v2
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
- name: Build docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64/v8
platforms: linux/amd64
check-lock-file-version:
name: NPM Lock File Version
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Check NPM lock file version
uses: mansona/npm-lockfile-version@v1
with:
version: 2
version: 1
check-mongo:
strategy:
matrix:
include:
- name: MongoDB 5.2, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.2.1
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
- name: MongoDB 5.1, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.1.1
MONGODB_VERSION: 5.1.0
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
- name: MongoDB 5.0, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.0.6
MONGODB_VERSION: 5.0.3
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
Expand All @@ -179,42 +133,43 @@ jobs:
NODE_VERSION: 16.13.0
- name: Redis Cache
PARSE_SERVER_TEST_CACHE: redis
MONGODB_VERSION: 8.0.0
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
NODE_VERSION: 22.4.1
- name: Node 20
MONGODB_VERSION: 8.0.0
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
- name: Node 12
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
NODE_VERSION: 20.15.1
- name: Node 18
MONGODB_VERSION: 8.0.0
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 12.22.7
- name: Node 14
MONGODB_VERSION: 4.4.10
MONGODB_TOPOLOGY: standalone
NODE_VERSION: 18.20.4
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 20
runs-on: ubuntu-latest
timeout-minutes: 15
runs-on: ubuntu-18.04
services:
redis:
image: redis
ports:
- 6379:6379
env:
- 6379:6379
env:
MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }}
MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }}
MONGODB_STORAGE_ENGINE: ${{ matrix.MONGODB_STORAGE_ENGINE }}
PARSE_SERVER_TEST_CACHE: ${{ matrix.PARSE_SERVER_TEST_CACHE }}
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- name: Fix usage of insecure GitHub protocol
run: sudo git config --system url."https://github".insteadOf "git://github"
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.NODE_VERSION }}
- name: Cache Node.js modules
uses: actions/cache@v4
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -226,47 +181,33 @@ jobs:
- run: npm run coverage
env:
CI: true
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
# Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- run: bash <(curl -s https://codecov.io/bash)
check-postgres:
strategy:
matrix:
include:
- name: PostgreSQL 13, PostGIS 3.1
POSTGRES_IMAGE: postgis/postgis:13-3.1
NODE_VERSION: 22.4.1
- name: PostgreSQL 11, PostGIS 3.0
POSTGRES_IMAGE: postgis/postgis:11-3.0
NODE_VERSION: 16.13.0
- name: PostgreSQL 11, PostGIS 3.1
POSTGRES_IMAGE: postgis/postgis:11-3.1
NODE_VERSION: 16.13.0
- name: PostgreSQL 11, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:11-3.2
NODE_VERSION: 16.13.0
- name: PostgreSQL 12, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:12-3.2
NODE_VERSION: 16.13.0
- name: PostgreSQL 13, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:13-3.2
NODE_VERSION: 22.4.1
- name: PostgreSQL 13, PostGIS 3.3
POSTGRES_IMAGE: postgis/postgis:13-3.3
NODE_VERSION: 22.4.1
- name: PostgreSQL 13, PostGIS 3.4
POSTGRES_IMAGE: postgis/postgis:13-3.4
NODE_VERSION: 22.4.1
- name: PostgreSQL 13, PostGIS 3.5
POSTGRES_IMAGE: postgis/postgis:13-3.5
NODE_VERSION: 22.4.1
- name: PostgreSQL 14, PostGIS 3.5
POSTGRES_IMAGE: postgis/postgis:14-3.5
NODE_VERSION: 22.4.1
- name: PostgreSQL 15, PostGIS 3.5
POSTGRES_IMAGE: postgis/postgis:15-3.5
NODE_VERSION: 22.4.1
- name: PostgreSQL 16, PostGIS 3.5
POSTGRES_IMAGE: postgis/postgis:16-3.5
NODE_VERSION: 22.4.1
- name: PostgreSQL 17, PostGIS 3.5
POSTGRES_IMAGE: postgis/postgis:17-3.5
NODE_VERSION: 22.4.1
NODE_VERSION: 16.13.0
- name: PostgreSQL 14, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:14-3.2
NODE_VERSION: 16.13.0
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 20
runs-on: ubuntu-latest
timeout-minutes: 15
runs-on: ubuntu-18.04
services:
redis:
image: redis
Expand All @@ -288,13 +229,13 @@ jobs:
PARSE_SERVER_TEST_DATABASE_URI: postgres://postgres:postgres@localhost:5432/parse_server_postgres_adapter_test_database
NODE_VERSION: ${{ matrix.NODE_VERSION }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.NODE_VERSION }}
- name: Cache Node.js modules
uses: actions/cache@v4
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -308,13 +249,4 @@ jobs:
- run: npm run coverage
env:
CI: true
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- run: bash <(curl -s https://codecov.io/bash)
Loading

0 comments on commit fff2db5

Please sign in to comment.