From 88a2b0ecfb9733792376e9424f4f126c14a654b8 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:31:52 -0800 Subject: [PATCH 01/48] Trying to setup GitHub Actions --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..bf4d1bc34b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: ci +on: [push, pull_request] +jobs: + check: + defaults: + NODE_VERSION: 10 + strategy: + matrix: + include: + - name: Mongo 4.0.4, ReplicaSet, WiredTiger + MONGODB_VERSION: 4.0.4 + MONGODB_TOPOLOGY: replicaset + MONGODB_STORAGE_ENGINE: wiredTiger + - name: Mongo 3.6.9, ReplicaSet, WiredTiger + MONGODB_VERSION: 3.6.9 + - name: Redis Cache + PARSE_SERVER_TEST_CACHE: redis + - name: Node 12.12.0 + NODE_VERSION: 12.12.0 + name: ${{ matrix.name }} + runs-on: ubuntu-16.04 + services: [redis, docker] + env: + COVERAGE_OPTION: ./node_modules/.bin/nyc + 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: + with: + node-version: ${{ matrix.NODE_VERSION }} + run: npm install -g greenkeeper-lockfile@1 + run: node -e 'require("./lib/index.js")' + run: greenkeeper-lockfile-update + run: npm run lint + run: npm run coverage + run: greenkeeper-lockfile-upload + run: bash <(curl -s https://codecov.io/bash) From dbca9852c837ad99b4e916183c380ca10c312a7b Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:40:19 -0800 Subject: [PATCH 02/48] Try to fix the workflow steps --- .github/workflows/ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf4d1bc34b..808d1a351a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,12 +28,15 @@ jobs: PARSE_SERVER_TEST_CACHE: ${{ matrix.PARSE_SERVER_TEST_CACHE }} NODE_VERSION: ${{ matrix.NODE_VERSION }} steps: - with: - node-version: ${{ matrix.NODE_VERSION }} - run: npm install -g greenkeeper-lockfile@1 - run: node -e 'require("./lib/index.js")' - run: greenkeeper-lockfile-update - run: npm run lint - run: npm run coverage - run: greenkeeper-lockfile-upload - run: bash <(curl -s https://codecov.io/bash) + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.NODE_VERSION }} + - run: npm install -g greenkeeper-lockfile@1 + - run: node -e 'require("./lib/index.js")' + - run: greenkeeper-lockfile-update + - run: npm run lint + - run: npm run coverage + - run: greenkeeper-lockfile-upload + - run: bash <(curl -s https://codecov.io/bash) From b4d20ca2dbe1593cc71eb883012466273ac2f18b Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:42:30 -0800 Subject: [PATCH 03/48] Fix NODE_VERSION --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 808d1a351a..5b9fc23a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,6 @@ name: ci on: [push, pull_request] jobs: check: - defaults: - NODE_VERSION: 10 strategy: matrix: include: @@ -11,10 +9,13 @@ jobs: MONGODB_VERSION: 4.0.4 MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger + NODE_VERSION: 10 - name: Mongo 3.6.9, ReplicaSet, WiredTiger MONGODB_VERSION: 3.6.9 + NODE_VERSION: 10 - name: Redis Cache PARSE_SERVER_TEST_CACHE: redis + NODE_VERSION: 10 - name: Node 12.12.0 NODE_VERSION: 12.12.0 name: ${{ matrix.name }} From 96c55d7368b4dc80930d8f1646dd96280b7967b6 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:44:22 -0800 Subject: [PATCH 04/48] Fix services --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b9fc23a4d..c4ec3a9c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,9 @@ jobs: NODE_VERSION: 12.12.0 name: ${{ matrix.name }} runs-on: ubuntu-16.04 - services: [redis, docker] + services: + redis + docker env: COVERAGE_OPTION: ./node_modules/.bin/nyc MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} From 84d9f9ba5df679d1a95ee136fc5f6d4313ffec68 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:47:41 -0800 Subject: [PATCH 05/48] Fix services 2 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4ec3a9c60..56d07b207b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: name: ${{ matrix.name }} runs-on: ubuntu-16.04 services: - redis - docker + redis: + docker: env: COVERAGE_OPTION: ./node_modules/.bin/nyc MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} From 09e13c3c3e93cbd3c451ed3ce4ebed1cbd4ab544 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:48:54 -0800 Subject: [PATCH 06/48] Fix redis service, remove docker service --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56d07b207b..273d230d38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-16.04 services: redis: - docker: + image: redis env: COVERAGE_OPTION: ./node_modules/.bin/nyc MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} From 560e3581bade4a6c95dd4c48c25dd3f09c4f8b94 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Mon, 30 Nov 2020 23:57:34 -0800 Subject: [PATCH 07/48] Missing npm install --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 273d230d38..4590de076a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: with: node-version: ${{ matrix.NODE_VERSION }} - run: npm install -g greenkeeper-lockfile@1 + - run: npm install - run: node -e 'require("./lib/index.js")' - run: greenkeeper-lockfile-update - run: npm run lint From c6c48c40af2aa3b772281a396ef74e8801528247 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 00:00:02 -0800 Subject: [PATCH 08/48] Fix Use Node.js step name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4590de076a..34e8bdcfd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: NODE_VERSION: ${{ matrix.NODE_VERSION }} steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.NODE_VERSION }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} From 84b8afa1450f78aa2a9ea7f1153bba864a50324e Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 00:07:15 -0800 Subject: [PATCH 09/48] Remove greenkeeper --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34e8bdcfd6..05b058d7cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,8 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} - - run: npm install -g greenkeeper-lockfile@1 - run: npm install - run: node -e 'require("./lib/index.js")' - - run: greenkeeper-lockfile-update - run: npm run lint - run: npm run coverage - - run: greenkeeper-lockfile-upload - run: bash <(curl -s https://codecov.io/bash) From a4745c86ce1e75eca393a9622faad8bf540d4aab Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 00:10:24 -0800 Subject: [PATCH 10/48] I believe we do not need this command --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05b058d7cb..1ba80df9dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,6 @@ jobs: with: node-version: ${{ matrix.NODE_VERSION }} - run: npm install - - run: node -e 'require("./lib/index.js")' - run: npm run lint - run: npm run coverage - run: bash <(curl -s https://codecov.io/bash) From 282443e418401beb8a7f86335f536e6557613da7 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 00:42:21 -0800 Subject: [PATCH 11/48] Try to include postgres --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ba80df9dd..1347a5b2b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,11 @@ jobs: NODE_VERSION: 10 - name: Node 12.12.0 NODE_VERSION: 12.12.0 + - name: Postgresql + POSTGRES_MAJOR_VERSION: 11 + PARSE_SERVER_TEST_DB: postgres + PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5433/parse_server_postgres_adapter_test_database + NODE_VERSION: 10 name: ${{ matrix.name }} runs-on: ubuntu-16.04 services: @@ -28,15 +33,26 @@ jobs: MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }} MONGODB_STORAGE_ENGINE: ${{ matrix.MONGODB_STORAGE_ENGINE }} + POSTGRES_MAJOR_VERSION: ${{ matrix.POSTGRES_MAJOR_VERSION }} + PARSE_SERVER_TEST_DB: ${{ matrix.PARSE_SERVER_TEST_DB }} + PARSE_SERVER_TEST_DATABASE_URI: ${{ matrix.PARSE_SERVER_TEST_DATABASE_URI }} PARSE_SERVER_TEST_CACHE: ${{ matrix.PARSE_SERVER_TEST_CACHE }} NODE_VERSION: ${{ matrix.NODE_VERSION }} steps: - uses: actions/checkout@v2 + - if: ${{ matrix.name == 'Postgresql' }} + uses: harmon758/postgresql-action@v1 + with: + postgresql version: '11' - name: Use Node.js ${{ matrix.NODE_VERSION }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} + - if: ${{ matrix.name == 'Postgresql' }} + run: bash scripts/before_install_postgres.sh - run: npm install + - if: ${{ matrix.name == 'Postgresql' }} + run: bash scripts/before_script_postgres.sh - run: npm run lint - run: npm run coverage - run: bash <(curl -s https://codecov.io/bash) From 560fc8e159e9366dce4e3b2f2c8ed820799b088a Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 01:07:54 -0800 Subject: [PATCH 12/48] Fix postgres script --- scripts/before_install_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_install_postgres.sh b/scripts/before_install_postgres.sh index 648fd95fc5..f70f0130e6 100755 --- a/scripts/before_install_postgres.sh +++ b/scripts/before_install_postgres.sh @@ -29,6 +29,6 @@ else # Setup postgres 11 or higher #Copy defauilt hba config file and tell postgres to restart - sudo cp /etc/postgresql/{10,${POSTGRES_MAJOR_VERSION}}/main/pg_hba.conf + sudo cp /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/pg_hba.conf sudo systemctl restart postgresql@${POSTGRES_MAJOR_VERSION}-main fi From 5b06bff27a291b8945c0e95561b3b77496c1a319 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 01:12:59 -0800 Subject: [PATCH 13/48] Remove before install script --- .github/workflows/ci.yml | 2 -- scripts/before_install_postgres.sh | 34 ------------------------------ 2 files changed, 36 deletions(-) delete mode 100755 scripts/before_install_postgres.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1347a5b2b3..3d0afc81ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} - - if: ${{ matrix.name == 'Postgresql' }} - run: bash scripts/before_install_postgres.sh - run: npm install - if: ${{ matrix.name == 'Postgresql' }} run: bash scripts/before_script_postgres.sh diff --git a/scripts/before_install_postgres.sh b/scripts/before_install_postgres.sh deleted file mode 100755 index f70f0130e6..0000000000 --- a/scripts/before_install_postgres.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -e -source ~/.nvm/nvm.sh - -echo "[SCRIPT] Before Install Script :: Setup Postgres ${POSTGRES_MAJOR_VERSION}" - -nvm install $NODE_VERSION -nvm use $NODE_VERSION -npm install -g greenkeeper-lockfile@1 - -if [[ $POSTGRES_MAJOR_VERSION -lt 11 ]]; then - # Setup postgres 9 or 10 - sudo sed -i 's/port = 5432/port = 5433/' /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/postgresql.conf - - # Stop the current running service - sudo service postgresql stop - - # Remove correct version of postgres - if [[ $POSTGRES_MAJOR_VERSION -lt 10 ]]; then - sudo apt-get remove -q 'postgresql-10.*' - else - sudo apt-get remove -q 'postgresql-9.*' - fi - - sudo service postgresql start - -else - # Setup postgres 11 or higher - - #Copy defauilt hba config file and tell postgres to restart - sudo cp /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/pg_hba.conf - sudo systemctl restart postgresql@${POSTGRES_MAJOR_VERSION}-main -fi From eb925537a5e4aa3664480443126036f3623ecb32 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 01:15:42 -0800 Subject: [PATCH 14/48] Fix postgres before script --- scripts/before_script_postgres.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 5699f51e93..51bd4554fa 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,9 +4,6 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -node -e 'require("./lib/index.js")' -greenkeeper-lockfile-update - psql -v ON_ERROR_STOP=1 -p 5433 --username "postgres" --dbname "${POSTGRES_DB}" <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; From e193496681268304d74ef10a8447821d0a40d61c Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 14:52:52 -0800 Subject: [PATCH 15/48] Try to fix connection to postgres --- scripts/before_script_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 51bd4554fa..7d7f2dfc1d 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -p 5433 --username "postgres" --dbname "${POSTGRES_DB}" <<-EOSQL +psql -v ON_ERROR_STOP=1 -p 5433 <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From dafa5586627e9fa197d9936904d292ec3a3f8e3f Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 14:58:47 -0800 Subject: [PATCH 16/48] Fix postgress port --- .github/workflows/ci.yml | 2 +- scripts/before_script_postgres.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d0afc81ba..cb3cf8495a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - name: Postgresql POSTGRES_MAJOR_VERSION: 11 PARSE_SERVER_TEST_DB: postgres - PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5433/parse_server_postgres_adapter_test_database + PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5432/parse_server_postgres_adapter_test_database NODE_VERSION: 10 name: ${{ matrix.name }} runs-on: ubuntu-16.04 diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 7d7f2dfc1d..00a9846cd8 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -p 5433 <<-EOSQL +psql -v ON_ERROR_STOP=1 -p 5432 <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 65b3368f9fbbe15739da6f8a268ebc8937d4c0ea Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 15:16:57 -0800 Subject: [PATCH 17/48] Postgres host --- .github/workflows/ci.yml | 4 ++-- scripts/before_script_postgres.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb3cf8495a..e5d30f44b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: - name: Node 12.12.0 NODE_VERSION: 12.12.0 - name: Postgresql - POSTGRES_MAJOR_VERSION: 11 PARSE_SERVER_TEST_DB: postgres + POSTGRES_MAJOR_VERSION: 11 PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5432/parse_server_postgres_adapter_test_database NODE_VERSION: 10 name: ${{ matrix.name }} @@ -33,8 +33,8 @@ jobs: MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }} MONGODB_STORAGE_ENGINE: ${{ matrix.MONGODB_STORAGE_ENGINE }} - POSTGRES_MAJOR_VERSION: ${{ matrix.POSTGRES_MAJOR_VERSION }} PARSE_SERVER_TEST_DB: ${{ matrix.PARSE_SERVER_TEST_DB }} + POSTGRES_MAJOR_VERSION: ${{ matrix.POSTGRES_MAJOR_VERSION }} PARSE_SERVER_TEST_DATABASE_URI: ${{ matrix.PARSE_SERVER_TEST_DATABASE_URI }} PARSE_SERVER_TEST_CACHE: ${{ matrix.PARSE_SERVER_TEST_CACHE }} NODE_VERSION: ${{ matrix.NODE_VERSION }} diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 00a9846cd8..b8c864c666 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -p 5432 <<-EOSQL +psql -v ON_ERROR_STOP=1 -h postgres -p 5432 <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 58c3a69e9577c55d574a553fad7b18e6e832f2a6 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 15:23:55 -0800 Subject: [PATCH 18/48] Still trying to connect on postgres --- scripts/before_script_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index b8c864c666..cde452ef78 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h postgres -p 5432 <<-EOSQL +psql -v ON_ERROR_STOP=1 <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 41be94213c33b0f4a2f86294548877e598a6e996 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 15:29:09 -0800 Subject: [PATCH 19/48] Still trying to connect on postgres - localhost --- .github/workflows/ci.yml | 2 +- scripts/before_script_postgres.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5d30f44b5..3c62a5b30d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 - - name: Mongo 3.6.9, ReplicaSet, WiredTiger + - name: Mongo 3.6.9 MONGODB_VERSION: 3.6.9 NODE_VERSION: 10 - name: Redis Cache diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index cde452ef78..0240d67e48 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 <<-EOSQL +psql -v ON_ERROR_STOP=1 -h localhost <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 43331dc266de6a50743e4ff3f591423c25321883 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 15:59:42 -0800 Subject: [PATCH 20/48] Split postgres in a separate job --- .github/workflows/ci.yml | 55 ++++++++++++++++++++----------- scripts/before_script_postgres.sh | 2 +- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c62a5b30d..a6ac16f46f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,10 @@ name: ci on: [push, pull_request] +env: + COVERAGE_OPTION: ./node_modules/.bin/nyc + NODE_VERSION: 10 jobs: - check: + check-mongo: strategy: matrix: include: @@ -18,39 +21,53 @@ jobs: NODE_VERSION: 10 - name: Node 12.12.0 NODE_VERSION: 12.12.0 - - name: Postgresql - PARSE_SERVER_TEST_DB: postgres - POSTGRES_MAJOR_VERSION: 11 - PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5432/parse_server_postgres_adapter_test_database - NODE_VERSION: 10 name: ${{ matrix.name }} runs-on: ubuntu-16.04 services: redis: image: redis - env: - COVERAGE_OPTION: ./node_modules/.bin/nyc + ports: + - 6379:6379 + env: MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }} MONGODB_STORAGE_ENGINE: ${{ matrix.MONGODB_STORAGE_ENGINE }} - PARSE_SERVER_TEST_DB: ${{ matrix.PARSE_SERVER_TEST_DB }} - POSTGRES_MAJOR_VERSION: ${{ matrix.POSTGRES_MAJOR_VERSION }} - PARSE_SERVER_TEST_DATABASE_URI: ${{ matrix.PARSE_SERVER_TEST_DATABASE_URI }} PARSE_SERVER_TEST_CACHE: ${{ matrix.PARSE_SERVER_TEST_CACHE }} NODE_VERSION: ${{ matrix.NODE_VERSION }} steps: - uses: actions/checkout@v2 - - if: ${{ matrix.name == 'Postgresql' }} - uses: harmon758/postgresql-action@v1 - with: - postgresql version: '11' - name: Use Node.js ${{ matrix.NODE_VERSION }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} - run: npm install - - if: ${{ matrix.name == 'Postgresql' }} - run: bash scripts/before_script_postgres.sh - - run: npm run lint + - if: ${{ matrix.name == 'Mongo 3.6.9' }} + run: npm run lint - run: npm run coverage - - run: bash <(curl -s https://codecov.io/bash) + - if: ${{ matrix.name == 'Mongo 3.6.9' }} + run: bash <(curl -s https://codecov.io/bash) + check-postgres: + name: Postgresql + runs-on: ubuntu-16.04 + services: + redis: + image: redis + ports: + - 6379:6379 + postgres: + image: postgres:11 + ports: + - 5432:5432 + env: + PARSE_SERVER_TEST_DB: postgres + POSTGRES_MAJOR_VERSION: 11 + PARSE_SERVER_TEST_DATABASE_URI: 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 + - run: npm install + - run: bash scripts/before_script_postgres.sh + - run: npm run coverage \ No newline at end of file diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 0240d67e48..ae8edb0c5f 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h localhost <<-EOSQL +psql -v ON_ERROR_STOP=1 -h localhost -p 5432 <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From c322d681e7775e815c2cf5a9242998132361d5fc Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 16:04:30 -0800 Subject: [PATCH 21/48] Add postgres healthcheck --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6ac16f46f..9f122b421f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,7 @@ jobs: image: postgres:11 ports: - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: PARSE_SERVER_TEST_DB: postgres POSTGRES_MAJOR_VERSION: 11 From 4883548daeb0bee8284d1df57341a9a9df5ae5f5 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:30:22 -0800 Subject: [PATCH 22/48] Set postgres just like github example --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f122b421f..049eecf3c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,10 +55,16 @@ jobs: ports: - 6379:6379 postgres: - image: postgres:11 + image: postgres + env: + POSTGRES_PASSWORD: postgres ports: - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 env: PARSE_SERVER_TEST_DB: postgres POSTGRES_MAJOR_VERSION: 11 From 82fdc695a4546d0e4e313fe33b70c65f9136c6ef Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:33:22 -0800 Subject: [PATCH 23/48] Fix postgres scripts with new credentials --- scripts/before_script_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index ae8edb0c5f..be56c5d9fd 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h localhost -p 5432 <<-EOSQL +psql -v ON_ERROR_STOP=1 -h postgres -W postgres <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 884fdfdc3a4b3ace65c7acefa2cd320c4e0e6523 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:42:33 -0800 Subject: [PATCH 24/48] Still trying to fix postgres connection --- .github/workflows/ci.yml | 2 +- scripts/before_script_postgres.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 049eecf3c4..f5e81aab20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: env: PARSE_SERVER_TEST_DB: postgres POSTGRES_MAJOR_VERSION: 11 - PARSE_SERVER_TEST_DATABASE_URI: postgres://localhost:5432/parse_server_postgres_adapter_test_database + 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 diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index be56c5d9fd..dcc6e945cd 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h postgres -W postgres <<-EOSQL +psql -v ON_ERROR_STOP=1 -h localhost -W postgres <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 13bc38b97f7263bd6e6b433c7f4dd05eca3e2c29 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:45:19 -0800 Subject: [PATCH 25/48] Now it looks only the username is wrong --- scripts/before_script_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index dcc6e945cd..0ab424b217 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h localhost -W postgres <<-EOSQL +psql -v ON_ERROR_STOP=1 -h localhost -U postgres -W postgres <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 702a4e1de4841176d7a23fc9e7b17c498407e029 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:50:54 -0800 Subject: [PATCH 26/48] Passing postgres password in the right way --- scripts/before_script_postgres.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script_postgres.sh b/scripts/before_script_postgres.sh index 0ab424b217..13951b998b 100755 --- a/scripts/before_script_postgres.sh +++ b/scripts/before_script_postgres.sh @@ -4,7 +4,7 @@ set -e echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}" -psql -v ON_ERROR_STOP=1 -h localhost -U postgres -W postgres <<-EOSQL +PGPASSWORD=postgres psql -v ON_ERROR_STOP=1 -h localhost -U postgres <<-EOSQL CREATE DATABASE parse_server_postgres_adapter_test_database; \c parse_server_postgres_adapter_test_database; CREATE EXTENSION postgis; From 9311927b5069ce76c60313654675aad8bbc559ae Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 20:56:24 -0800 Subject: [PATCH 27/48] try to install postgis --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5e81aab20..e885aa57e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: ports: - 6379:6379 postgres: - image: postgres + image: postgis/postgis:11 env: POSTGRES_PASSWORD: postgres ports: From 8c283f0e1173fa9bb866015ec3c5f697fc5ed5c8 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 21:00:30 -0800 Subject: [PATCH 28/48] New attempt to install postgis --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e885aa57e9..01443b22e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: ports: - 6379:6379 postgres: - image: postgis/postgis:11 + image: postgis/postgis:11-3 env: POSTGRES_PASSWORD: postgres ports: From aed0ad0eef579116c2c5522446fbcf7ed6727d7a Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 21:03:17 -0800 Subject: [PATCH 29/48] Fix postgis image name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01443b22e7..ee62f692f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: ports: - 6379:6379 postgres: - image: postgis/postgis:11-3 + image: postgis/postgis:11-3.0 env: POSTGRES_PASSWORD: postgres ports: From 19d1cd0f1966d9c86659a2f2fc6d0eb73e67d13d Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 21:13:54 -0800 Subject: [PATCH 30/48] Try to output tests --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee62f692f4..7632bd0767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,11 @@ jobs: - run: npm install - if: ${{ matrix.name == 'Mongo 3.6.9' }} run: npm run lint + env: + CI: true - run: npm run coverage + env: + CI: true - if: ${{ matrix.name == 'Mongo 3.6.9' }} run: bash <(curl -s https://codecov.io/bash) check-postgres: @@ -77,4 +81,6 @@ jobs: node-version: 10 - run: npm install - run: bash scripts/before_script_postgres.sh - - run: npm run coverage \ No newline at end of file + - run: npm run coverage + env: + CI: true \ No newline at end of file From b2f4714b54ea809c081a2d2328afe58a94a1bfa1 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 21:25:03 -0800 Subject: [PATCH 31/48] We need to start mongo --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7632bd0767..b27aeed00d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,7 @@ jobs: - run: npm install - if: ${{ matrix.name == 'Mongo 3.6.9' }} run: npm run lint - env: - CI: true + - run: npm run pretest - run: npm run coverage env: CI: true From 7bf4bbdb21444ebdb90cef867b747d56b43e6f1f Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 21:57:52 -0800 Subject: [PATCH 32/48] Increase tests timeout --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b27aeed00d..2c9ca5cbbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: [push, pull_request] env: COVERAGE_OPTION: ./node_modules/.bin/nyc NODE_VERSION: 10 + PARSE_SERVER_TEST_TIMEOUT: 20000 jobs: check-mongo: strategy: From 7679739a5ba401b01763006e87353487559a60f2 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 22:29:46 -0800 Subject: [PATCH 33/48] Fix flaky test --- spec/CloudCode.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/CloudCode.spec.js b/spec/CloudCode.spec.js index 0a672db17e..9716c2a93c 100644 --- a/spec/CloudCode.spec.js +++ b/spec/CloudCode.spec.js @@ -1633,9 +1633,8 @@ describe('Cloud Code', () => { it('should set the message / success on the job', done => { Parse.Cloud.job('myJob', req => { - req.message('hello'); const promise = req - .message() + .message('hello') .then(() => { return getJobStatus(req.jobId); }) From 1e40452d03b04cd68d6f94134756bc6f5269a909 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 23:11:06 -0800 Subject: [PATCH 34/48] Add GitHub Actions badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b500230c13..bd5096c1e0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Follow on Twitter - Build status + ![Build status](https://github.com/parse-community/parse-server/workflows/ci/badge.svg?branch=master) Coverage status npm version Join the conversation From 5a573392dd50fd0948c69c3a0ca3531f8c400118 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 23:13:32 -0800 Subject: [PATCH 35/48] Badge as html --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd5096c1e0..b583f6b3b4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Follow on Twitter - ![Build status](https://github.com/parse-community/parse-server/workflows/ci/badge.svg?branch=master) + Build status Coverage status npm version Join the conversation From 48fa133c417f9f4239cf5e676a8d3ae513b43c30 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 23:17:09 -0800 Subject: [PATCH 36/48] Fix badge link --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b583f6b3b4..c3720c4138 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@

Follow on Twitter - Build status + + Build status + Coverage status npm version Join the conversation From 6b9d14e6bcee48801fd4a6787940d5584a367a4b Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 23:18:27 -0800 Subject: [PATCH 37/48] Remove Travis --- .travis.yml | 80 ----------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a11f54b871..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,80 +0,0 @@ -language: node_js -os: linux -dist: xenial -services: -- redis -- docker -branches: - only: - - master - - "/^[0-9]+.[0-9]+.[0-9]+(-.*)?$/" - - 3.x - - 4.x - - "/^greenkeeper/.*$/" -cache: - directories: - - "$HOME/.npm" - - ".eslintcache" -env: - global: - - COVERAGE_OPTION='./node_modules/.bin/nyc' - jobs: - - MONGODB_VERSION=4.0.4 MONGODB_TOPOLOGY=replicaset MONGODB_STORAGE_ENGINE=wiredTiger - - MONGODB_VERSION=3.6.9 - - PARSE_SERVER_TEST_CACHE=redis - - NODE_VERSION=12.12.0 -before_install: -- nvm install $NODE_VERSION -- nvm use $NODE_VERSION -- npm install -g greenkeeper-lockfile@1 -before_script: -- node -e 'require("./lib/index.js")' -- greenkeeper-lockfile-update -script: -- npm run lint -- npm run pretest && npm run coverage -after_script: -- greenkeeper-lockfile-upload -- bash <(curl -s https://codecov.io/bash) -jobs: - allow_failures: - - env: NODE_VERSION=12.12.0 - include: - - stage: - addons: - postgresql: '11' - apt: - packages: - - postgresql-11-postgis-3 - - postgresql-11-postgis-3-scripts - env: POSTGRES_MAJOR_VERSION=11 PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://localhost:5433/parse_server_postgres_adapter_test_database - before_install: bash scripts/before_install_postgres.sh - before_script: bash scripts/before_script_postgres.sh - script: - - npm run lint - - npm run coverage - - stage: release - node_js: '10' - env: - before_script: skip - after_script: skip - script: - - "./release_docs.sh" - deploy: - - provider: pages - skip_cleanup: true - token: - secure: YU2lUqmW036AHBRu7xO/AwEeQ900Q/5O6FL96ZqWEfD7Gadaq4iapkNvhPR0HcZYRHqQV2/2LCHVnhd0dbj0ShkmVIHdQE7O+MF+j0v0GIVc8FPTPe1/d2Hy4apSWNe6FeCrYKVeliAu+ZqvNuFLhVmYvIeJdlJrMGOb6P76UZXRDv2srXhq4uBcCVUJuTajyyd5ttJfcNapymTP+xzEDYc7Hr4LJaubmv/wVD/xwPBbvfYFuBqysUpkPKi/ODlQbB0ybYh2fFnX71WUyFUGbtB5xI9ma951Zp4v3t73c31uUl27dJaHzO62EtVTdcUKAa804EtAtsvpeJWMVWKUgigm9UZcXdEwKa79fl5nLaq34lrSktAYOkexwPqYj+vbS6sn52JrluSxLE+4cEke7tYbnJ9X12SAQXKgcXY3n30+6gKf9RVqYdlNsYpEAqKVIDb6SlEkk86dP+uIg/XXb5RKEwxbDXnb6xdl9JRc+GTbeeY3/vg2h9QTdmFVblPtBhHrNenQYP/BS0n+EfUnAIBKqRmQgyhao3SiY5FMACM8higI2Lvvhpq46pDhXqsexYCz5F008C6YXGDh5gC93rJFec0pjh55DNdQu6uw3YMQ5jtf3QUXoPAoMFud3cTulMlnjC1WZG8QbqER8dzUZ4TcaQUdzribJI/mRriheBg= - local_dir: docs/ - on: - all_branches: true - - provider: npm - skip_cleanup: true - api_token: - secure: Yrng6jsnMAtzrrln9DwRuY4xpcxl/WYS/1A5fckyQF6DsLmNlvqVtu3MWF+zdJgANF63G3jIee11tNBpYRecHl8FjPGwO0kc1vEgvIRVnveyR0bwIIDH6s/mR9dg4rZikflwG4XExsLyaQd7ko8aTIOIayfxJiv/u0yqwuBuBW2bFrL/41b1cKGK5+Iq2a+PdFENUPenKXISkACGaMnQF4Y/KVF98UwCiGLf957yFWc2sD6TFbjNDbAENSccvg1J3fBb+djbtzKzldl29ntp2mKVGSVASiKCRa6hSfgQulHiidFqFIKgpYJ1uATRr3UFr/NRVt1WbrgLnzY74OCX7y02c/xiYQMMEPRl/P8hHJu+KjQ3PBWsBvmsRN0QMUJv3PEjUPE3AY8sw49NoxiJZzJr7574vUBuM/dk0byYI6K/gwmUrPIhQjljzZqinS8JJJ4FjGjCdzXRhT5Q+PZvt5bF1rMOZXayNJZa+cICtmiJoU3vO2Yf6TXC3wY1veKvmcs24nws5lp4keJePTKAi1Ig7VoSxwAlgs3EGANIh7oBKx9zWnXQYMdmxbYsvLXAWcnnM+PcSCvooLmXWso3BQBeRuUUSS2oLaBpsFMsiniLNbA1cW4fwMkgUGz4oEDRi8wTD89E/1J2oNxzqtWRPawcVKpMpnBbDJHrWJPEHMw= - email: - secure: lomzDl71N995SzRczm7VE9OZE+PzMo4X8t3zU97agu/FMH5Qcj8BLwE+uVDTnA9Vblyj62ZsFKsNjP2Qp53Vcd+jHM4EJNWNRZYpEMIRO3LngX43r83qoFEHUvPu9s1oaa04a6FojcsJx0wl6B6Ke2AX74MXnJDLb9iZBy1mkpLUMVccVhSfhdoIzhkq3dhUw+6d8C024tNMHcgDW3VnRAsWFtiL7dCMpjLOdI+UxlkeGkQkxXXuRsZ0ZdjoSoM8NSkiYMc8x6EnekyRDoHTujX3OFxuU6+GAjrUmVzNmJWrBIqHVb0DXBQxjEaG3d/cNu5UsQyZYq5sxRRH0BaLs7F4oIQg95etasEtTtUkmsZ3pshVlsweiLU366UdbfuAf5hrJjqLrU12BKZyLjaAwyeKz031r8dA4sJtGIp5uVdXobQQTH6r958A88byJ20uaYSqhqjhZo3hkWXIQP0WQN2Ej/g57HbVNLB/nPKkMILfk/tpp7nBDLT0QrjbZxeo1dwCHqsBEV6z7ZyWyFf4xwpDsir4txL4t8ElzeGdlACjCqAJvIh5w9YzfrwijtoVMvvP6pWvn/iI640d4rsdIDe8egxgqZ1R/TMd/tdHYX+eI+ZfFmCVGj36/uXwdG7KIoIZVjRQ2tvWr9ZuydEPWPSRVGT4ycFeu6wbm3elM3I= - on: - tags: true - all_branches: true - repo: parse-community/parse-server From 49662995894273cd9e436fd4170c081104724a9f Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Tue, 1 Dec 2020 23:57:16 -0800 Subject: [PATCH 38/48] try to fix coverage --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c9ca5cbbd..47d9582d74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,7 @@ jobs: - run: npm run coverage env: CI: true - - if: ${{ matrix.name == 'Mongo 3.6.9' }} - run: bash <(curl -s https://codecov.io/bash) + - run: bash <(curl -s https://codecov.io/bash) check-postgres: name: Postgresql runs-on: ubuntu-16.04 @@ -83,4 +82,5 @@ jobs: - run: bash scripts/before_script_postgres.sh - run: npm run coverage env: - CI: true \ No newline at end of file + CI: true + - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file From 32654cfef77d156d792aa624b9928e0f60be2e3a Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Wed, 2 Dec 2020 01:26:59 -0800 Subject: [PATCH 39/48] Fix flaky test --- spec/CloudCode.spec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/CloudCode.spec.js b/spec/CloudCode.spec.js index 9716c2a93c..2d660df99e 100644 --- a/spec/CloudCode.spec.js +++ b/spec/CloudCode.spec.js @@ -1715,9 +1715,15 @@ describe('Cloud Code', () => { throw new Parse.Error(101, 'Something went wrong'); }); const job = await Parse.Cloud.startJob('myJobError'); - const jobStatus = await Parse.Cloud.getJobStatus(job); + let jobStatus, status; + while (status !== 'failed') { + if (jobStatus) { + await new Promise(resolve => setTimeout(resolve, 10)); + } + jobStatus = await Parse.Cloud.getJobStatus(job); + status = jobStatus.get('status'); + } expect(jobStatus.get('message')).toEqual('Something went wrong'); - expect(jobStatus.get('status')).toEqual('failed'); }); function getJobStatus(jobId) { From 7cc580a54f3869c73c53f392ec0e664038ad7685 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:23:57 -0800 Subject: [PATCH 40/48] Improve ci workflow --- .github/workflows/ci.yml | 110 ++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47d9582d74..7a85990b00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,11 @@ name: ci -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - '**' env: COVERAGE_OPTION: ./node_modules/.bin/nyc NODE_VERSION: 10 @@ -9,21 +15,24 @@ jobs: strategy: matrix: include: - - name: Mongo 4.0.4, ReplicaSet, WiredTiger - MONGODB_VERSION: 4.0.4 + - name: Mongo 4.4.2, ReplicaSet, WiredTiger + MONGODB_VERSION: 4.4.2 MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 - - name: Mongo 3.6.9 - MONGODB_VERSION: 3.6.9 + - name: Mongo 3.6.21 + MONGODB_VERSION: 3.6.21 NODE_VERSION: 10 - name: Redis Cache PARSE_SERVER_TEST_CACHE: redis NODE_VERSION: 10 - name: Node 12.12.0 NODE_VERSION: 12.12.0 + - name: Node 14.15.1 + NODE_VERSION: 14.15.1 name: ${{ matrix.name }} - runs-on: ubuntu-16.04 + timeout-minutes: 30 + runs-on: ubuntu-20.04 services: redis: image: redis @@ -41,7 +50,16 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.NODE_VERSION }} - - run: npm install + - name: Cache Node.js modules + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + - name: Install dependencies + run: npm ci - if: ${{ matrix.name == 'Mongo 3.6.9' }} run: npm run lint - run: npm run pretest @@ -50,37 +68,47 @@ jobs: CI: true - run: bash <(curl -s https://codecov.io/bash) check-postgres: - name: Postgresql - runs-on: ubuntu-16.04 - services: - redis: - image: redis - ports: - - 6379:6379 - postgres: - image: postgis/postgis:11-3.0 - 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 - POSTGRES_MAJOR_VERSION: 11 - 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 - - run: npm install - - run: bash scripts/before_script_postgres.sh - - run: npm run coverage - env: - CI: true - - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file + name: Postgresql + timeout-minutes: 30 + runs-on: ubuntu-20.04 + services: + redis: + image: redis + ports: + - 6379:6379 + postgres: + image: postgis/postgis:11-3.0 + 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 + POSTGRES_MAJOR_VERSION: 11 + 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-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + - 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) \ No newline at end of file From eab69401b2ae63cf23f1ee95e2e2240f5278ceb2 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:26:25 -0800 Subject: [PATCH 41/48] Change the mongo default test version --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7cb57d2f7a..cb5d8e78ca 100644 --- a/package.json +++ b/package.json @@ -99,11 +99,11 @@ "lint-fix": "eslint --fix --cache ./", "build": "babel src/ -d lib/ --copy-files", "watch": "babel --watch src/ -d lib/ --copy-files", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", - "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", + "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", "test": "npm run testonly", - "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", - "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", + "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", "start": "node ./bin/parse-server", "prettier": "prettier --write {src,spec}/{**/*,*}.js", "prepare": "npm run build", From 88b0c0b0ba1b9c3249ffacf82c69415606c71d3d Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:31:08 -0800 Subject: [PATCH 42/48] Fix the job name in the if clause --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a85990b00..f2bec23e59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: ${{ runner.OS }}- - name: Install dependencies run: npm ci - - if: ${{ matrix.name == 'Mongo 3.6.9' }} + - if: ${{ matrix.name == 'Mongo 3.6.21' }} run: npm run lint - run: npm run pretest - run: npm run coverage From dd53117c71e97d0a8b85f2dd059fe9969fa053eb Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:39:45 -0800 Subject: [PATCH 43/48] Ubuntu18.0.4 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2bec23e59..458e641fbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: NODE_VERSION: 14.15.1 name: ${{ matrix.name }} timeout-minutes: 30 - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 services: redis: image: redis @@ -70,7 +70,7 @@ jobs: check-postgres: name: Postgresql timeout-minutes: 30 - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 services: redis: image: redis From ac0d66c0ad0f6dfd2be3090ff7d5881992312165 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:54:54 -0800 Subject: [PATCH 44/48] Downgrade to 4.0.21 --- .github/workflows/ci.yml | 14 ++++---------- package.json | 8 ++++---- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 458e641fbe..0d33632c06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: include: - - name: Mongo 4.4.2, ReplicaSet, WiredTiger - MONGODB_VERSION: 4.4.2 + - name: Mongo 4.0.21, ReplicaSet, WiredTiger + MONGODB_VERSION: 4.0.21 MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 @@ -54,10 +54,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + key: ${{ runner.OS }}-node-${{ matrix.NODE_VERSION }}-package-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm ci - if: ${{ matrix.name == 'Mongo 3.6.21' }} @@ -101,10 +98,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + key: ${{ runner.OS }}-node-${{ matrix.NODE_VERSION }}-package-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm ci - run: bash scripts/before_script_postgres.sh diff --git a/package.json b/package.json index cb5d8e78ca..498f4b2e6a 100644 --- a/package.json +++ b/package.json @@ -99,11 +99,11 @@ "lint-fix": "eslint --fix --cache ./", "build": "babel src/ -d lib/ --copy-files", "watch": "babel --watch src/ -d lib/ --copy-files", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", - "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", + "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", "test": "npm run testonly", - "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", - "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.4.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", + "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", "start": "node ./bin/parse-server", "prettier": "prettier --write {src,spec}/{**/*,*}.js", "prepare": "npm run build", From 70c7cb4ce2c7029b0cbdd8993c0f75dcbd5f4a63 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 00:59:28 -0800 Subject: [PATCH 45/48] Fix cache keys: --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d33632c06..0ec7ced32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.OS }}-node-${{ matrix.NODE_VERSION }}-package-${{ hashFiles('**/package-lock.json') }} + 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 - if: ${{ matrix.name == 'Mongo 3.6.21' }} @@ -98,7 +100,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.OS }}-node-${{ matrix.NODE_VERSION }}-package-${{ hashFiles('**/package-lock.json') }} + 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 From f7a9e7213726a90b3ba25f1eed614b74db029b3e Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 01:07:29 -0800 Subject: [PATCH 46/48] Trying with mongo 4.0.4 --- .github/workflows/ci.yml | 4 ++-- package.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ec7ced32f..df68d102eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: include: - - name: Mongo 4.0.21, ReplicaSet, WiredTiger - MONGODB_VERSION: 4.0.21 + - name: Mongo 4.0.4, ReplicaSet, WiredTiger + MONGODB_VERSION: 4.0.4 MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 diff --git a/package.json b/package.json index 498f4b2e6a..7cb57d2f7a 100644 --- a/package.json +++ b/package.json @@ -99,11 +99,11 @@ "lint-fix": "eslint --fix --cache ./", "build": "babel src/ -d lib/ --copy-files", "watch": "babel --watch src/ -d lib/ --copy-files", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", - "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start", + "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 jasmine", "test": "npm run testonly", - "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", - "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.21} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", + "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop", + "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine", "start": "node ./bin/parse-server", "prettier": "prettier --write {src,spec}/{**/*,*}.js", "prepare": "npm run build", From 289cd448c1d5a55b5ef7bcaf9c640d59e201d7be Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 01:14:08 -0800 Subject: [PATCH 47/48] Rever os and mongo versions --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df68d102eb..247a09b1a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,8 @@ jobs: MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 - - name: Mongo 3.6.21 - MONGODB_VERSION: 3.6.21 + - name: Mongo 3.6.9 + MONGODB_VERSION: 3.6.9 NODE_VERSION: 10 - name: Redis Cache PARSE_SERVER_TEST_CACHE: redis @@ -32,7 +32,7 @@ jobs: NODE_VERSION: 14.15.1 name: ${{ matrix.name }} timeout-minutes: 30 - runs-on: ubuntu-18.04 + runs-on: ubuntu-16.04 services: redis: image: redis @@ -59,7 +59,7 @@ jobs: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}- - name: Install dependencies run: npm ci - - if: ${{ matrix.name == 'Mongo 3.6.21' }} + - if: ${{ matrix.name == 'Mongo 3.6.9' }} run: npm run lint - run: npm run pretest - run: npm run coverage @@ -69,7 +69,7 @@ jobs: check-postgres: name: Postgresql timeout-minutes: 30 - runs-on: ubuntu-18.04 + runs-on: ubuntu-16.04 services: redis: image: redis From b8dfcb9ee37cfbd6f5c6e0a5422a1fc328b214a5 Mon Sep 17 00:00:00 2001 From: Antonio Davi Macedo Coelho de Castro Date: Thu, 3 Dec 2020 01:19:38 -0800 Subject: [PATCH 48/48] remove latest node --- .github/workflows/ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 247a09b1a3..6a1873af7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,19 +20,17 @@ jobs: MONGODB_TOPOLOGY: replicaset MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 10 - - name: Mongo 3.6.9 - MONGODB_VERSION: 3.6.9 + - name: Mongo 3.6.21 + MONGODB_VERSION: 3.6.21 NODE_VERSION: 10 - name: Redis Cache PARSE_SERVER_TEST_CACHE: redis NODE_VERSION: 10 - name: Node 12.12.0 NODE_VERSION: 12.12.0 - - name: Node 14.15.1 - NODE_VERSION: 14.15.1 name: ${{ matrix.name }} timeout-minutes: 30 - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 services: redis: image: redis @@ -59,7 +57,7 @@ jobs: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}- - name: Install dependencies run: npm ci - - if: ${{ matrix.name == 'Mongo 3.6.9' }} + - if: ${{ matrix.name == 'Mongo 3.6.21' }} run: npm run lint - run: npm run pretest - run: npm run coverage @@ -69,7 +67,7 @@ jobs: check-postgres: name: Postgresql timeout-minutes: 30 - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 services: redis: image: redis