-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add Parse Server Test Suite (#37)
- Loading branch information
Showing
32 changed files
with
8,124 additions
and
448 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
"transform-flow-strip-types" | ||
], | ||
"presets": [ | ||
"es2015", | ||
"stage-0" | ||
] | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"node": "14" | ||
}, | ||
"exclude": ["proposal-dynamic-import"] | ||
}] | ||
], | ||
"sourceMaps": "inline" | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,29 @@ | ||
{ | ||
"root": true, | ||
"extends": "airbnb-base", | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"import", | ||
"flowtype" | ||
], | ||
"globals": { | ||
"Parse": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
}, | ||
"rules": { | ||
"indent": ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
"no-trailing-spaces": 2, | ||
"eol-last": 2, | ||
"space-in-parens": ["error", "never"], | ||
"no-multiple-empty-lines": 1, | ||
"prefer-const": "error", | ||
"no-console":0, | ||
"no-underscore-dangle":0, | ||
"no-throw-literal":0, | ||
"consistent-return":0, | ||
"no-param-reassign":0, | ||
"max-len":0, | ||
"import/no-extraneous-dependencies": ["error", { | ||
"devDependencies": true, | ||
"optionalDependencies": true, | ||
"peerDependencies": true | ||
}], | ||
"comma-dangle": ["error", { | ||
"arrays": "always-multiline", | ||
"objects": "always-multiline", | ||
"imports": "always-multiline", | ||
"exports": "always-multiline", | ||
"functions": "ignore" | ||
}] | ||
} | ||
} | ||
"root": true, | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"requireConfigFile": false | ||
}, | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"linebreak-style": ["error", "unix"], | ||
"no-trailing-spaces": 2, | ||
"eol-last": 2, | ||
"space-in-parens": ["error", "never"], | ||
"no-multiple-empty-lines": 1, | ||
"prefer-const": "error", | ||
"space-infix-ops": "error", | ||
"no-useless-escape": "off", | ||
"require-atomic-updates": "off" | ||
}, | ||
"globals": { | ||
"Parse": true | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [ master' ] | ||
pull_request: | ||
branches: | ||
- '**' | ||
env: | ||
PARSE_SERVER_TEST_TIMEOUT: 20000 | ||
PARSE_SERVER_TEST_CACHE: redis | ||
jobs: | ||
check-lint: | ||
name: Lint | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-22.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-mysql: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: MySQL 8.0.34 | ||
MYSQL_IMAGE: mysql:8.0.34 | ||
NODE_VERSION: 18.16.0 | ||
- name: MySQL 8.1.0 | ||
MYSQL_IMAGE: mysql:8.1.0 | ||
NODE_VERSION: 18.16.0 | ||
fail-fast: false | ||
name: ${{ matrix.name }} | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-22.04 | ||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
env: | ||
PARSE_SERVER_TEST_DB: mysql | ||
PARSE_SERVER_TEST_DATABASE_URI: mysql://root:root@localhost:3306/parse_server_mysql_adapter_test_database | ||
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 | ||
- name: Set up MySQL | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
mysql -e 'CREATE DATABASE parse_server_mysql_adapter_test_database;' -uroot -proot | ||
mysql -e 'SHOW DATABASES;' -uroot -proot | ||
- name: Initialize tests | ||
run: npm run test:init | ||
- name: Coverage | ||
run: npm run coverage | ||
env: | ||
CI: true | ||
- run: bash <(curl -s https://codecov.io/bash) | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,3 +76,5 @@ lib/ | |
# Folder created by FileSystemAdapter | ||
/files | ||
|
||
# Prevent Parse-Server changes | ||
/parse-server |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "parse-server"] | ||
path = parse-server | ||
url = https://github.com/parse-community/parse-server |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.16.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
"text-summary" | ||
], | ||
"exclude": [ | ||
"**/spec/**", | ||
"**/test/**", | ||
"parse-server/", | ||
"lib/" | ||
] | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.