187 lines
6.0 KiB
YAML
187 lines
6.0 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
env:
|
|
COVERAGE_OPTION: ./node_modules/.bin/nyc
|
|
NODE_VERSION: 14.16.0
|
|
PARSE_SERVER_TEST_TIMEOUT: 20000
|
|
jobs:
|
|
check-ci:
|
|
name: CI Self-Check
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.NODE_VERSION }}
|
|
uses: actions/setup-node@v1
|
|
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
|
|
- name: CI Self-Check
|
|
run: npm run ci:check
|
|
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@v1
|
|
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-mongo:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: Mongo 4.4, ReplicaSet, WiredTiger
|
|
MONGODB_VERSION: 4.4.4
|
|
MONGODB_TOPOLOGY: replicaset
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 14.16.0
|
|
- name: Mongo 4.2, ReplicaSet, WiredTiger
|
|
MONGODB_VERSION: 4.2.13
|
|
MONGODB_TOPOLOGY: replicaset
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 14.16.0
|
|
- name: Mongo 4.0, ReplicaSet, WiredTiger
|
|
MONGODB_VERSION: 4.0.23
|
|
MONGODB_TOPOLOGY: replicaset
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 14.16.0
|
|
- name: Mongo 4.0, Standalone, MMAPv1
|
|
MONGODB_VERSION: 4.0.23
|
|
MONGODB_TOPOLOGY: standalone
|
|
MONGODB_STORAGE_ENGINE: mmapv1
|
|
NODE_VERSION: 14.16.0
|
|
- name: Redis Cache
|
|
PARSE_SERVER_TEST_CACHE: redis
|
|
MONGODB_VERSION: 4.4.4
|
|
MONGODB_TOPOLOGY: standalone
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 14.16.0
|
|
- name: Node 12
|
|
MONGODB_VERSION: 4.4.4
|
|
MONGODB_TOPOLOGY: standalone
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 12.22.0
|
|
- name: Node 15
|
|
MONGODB_VERSION: 4.4.4
|
|
MONGODB_TOPOLOGY: standalone
|
|
MONGODB_STORAGE_ENGINE: wiredTiger
|
|
NODE_VERSION: 15.13.0
|
|
fail-fast: false
|
|
name: ${{ matrix.name }}
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-18.04
|
|
services:
|
|
redis:
|
|
image: redis
|
|
ports:
|
|
- 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:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.NODE_VERSION }}
|
|
uses: actions/setup-node@v1
|
|
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 pretest
|
|
- run: npm run coverage
|
|
env:
|
|
CI: true
|
|
- run: bash <(curl -s https://codecov.io/bash)
|
|
check-postgres:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: Postgres 10, Postgis 3.1
|
|
POSTGRES_IMAGE: postgis/postgis:10-3.1
|
|
- name: Postgres 11, Postgis 3.1
|
|
POSTGRES_IMAGE: postgis/postgis:11-3.1
|
|
- name: Postgres 12, Postgis 3.1
|
|
POSTGRES_IMAGE: postgis/postgis:12-3.1
|
|
- name: Postgres 12, Postgis 3.0
|
|
POSTGRES_IMAGE: postgis/postgis:12-3.0
|
|
- name: Postgres 13, Postgis 3.1
|
|
POSTGRES_IMAGE: postgis/postgis:13-3.1
|
|
fail-fast: false
|
|
name: ${{ matrix.name }}
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-18.04
|
|
services:
|
|
redis:
|
|
image: redis
|
|
ports:
|
|
- 6379:6379
|
|
postgres:
|
|
image: ${{ matrix.POSTGRES_IMAGE }}
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
env:
|
|
PARSE_SERVER_TEST_DB: postgres
|
|
PARSE_SERVER_TEST_DATABASE_URI: postgres://postgres:postgres@localhost:5432/parse_server_postgres_adapter_test_database
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js 10
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- 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: bash scripts/before_script_postgres.sh
|
|
- run: npm run coverage
|
|
env:
|
|
CI: true
|
|
- run: bash <(curl -s https://codecov.io/bash)
|