Skip to content

Commit 1f74921

Browse files
authored
ci: Add integration tests for Parse Server (#224)
1 parent e2f1e7d commit 1f74921

16 files changed

+7868
-10270
lines changed

.eslintrc.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"extends": "eslint:recommended",
44
"env": {
55
"node": true,
6-
"es6": true
6+
"es2020": true
77
},
88
"parserOptions": {
9-
"ecmaVersion": 8,
10-
"sourceType": "module"
9+
"ecmaVersion": 2020,
10+
"sourceType": "module",
11+
"requireConfigFile": false
1112
},
1213
"rules": {
1314
"indent": ["error", 2, { "SwitchCase": 1 }],
@@ -19,6 +20,12 @@
1920
"prefer-const": "error",
2021
"space-infix-ops": "error",
2122
"no-useless-escape": "off",
22-
"require-atomic-updates": "off"
23+
"require-atomic-updates": "off",
24+
"object-curly-spacing": ["error", "always"],
25+
"curly": ["error", "all"],
26+
"block-spacing": ["error", "always"]
27+
},
28+
"globals": {
29+
"Parse": true
2330
}
2431
}

.github/workflows/ci.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,34 @@ jobs:
2525
strategy:
2626
matrix:
2727
include:
28-
- name: Node.js 18
28+
- name: Parse Server 7, Node.js 18
2929
NODE_VERSION: 18.20.4
30-
- name: Node.js 20
30+
PARSE_SERVER_VERSION: 7
31+
- name: Parse Server 7, Node.js 20
3132
NODE_VERSION: 20.15.1
32-
- name: Node.js 22
33+
PARSE_SERVER_VERSION: 7
34+
- name: Parse Server 7, Node.js 22
3335
NODE_VERSION: 22.4.1
36+
PARSE_SERVER_VERSION: 7
37+
- name: Parse Server 6
38+
NODE_VERSION: 18
39+
PARSE_SERVER_VERSION: 6
3440
fail-fast: false
3541
name: ${{ matrix.name }}
3642
timeout-minutes: 15
3743
runs-on: ubuntu-latest
44+
env:
45+
NODE_VERSION: ${{ matrix.NODE_VERSION }}
46+
PARSE_SERVER_VERSION: ${{ matrix.PARSE_SERVER_VERSION }}
3847
steps:
3948
- uses: actions/checkout@v4
4049
- name: Use Node.js ${{ matrix.NODE_VERSION }}
4150
uses: actions/setup-node@v4
4251
with:
4352
node-version: ${{ matrix.NODE_VERSION }}
4453
cache: npm
54+
- name: Install Parse Server ${{ matrix.PARSE_SERVER_VERSION }}
55+
run: npm i -DE parse-server@${{ matrix.PARSE_SERVER_VERSION }}
4556
- name: Install dependencies
4657
run: npm ci
4758
- name: Run tests

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@ node_modules
3636
# Webstorm
3737
.idea/
3838

39+
# Lint
3940
.eslintcache
41+
42+
# Parse Server
43+
test_logs

.nycrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"text-summary"
66
],
77
"include": [
8-
"src/**/*.js"
8+
"src/**/*.js",
9+
"lib/**/*.js",
10+
"index.js"
911
],
1012
"exclude": [
1113
"**/spec/**"

README.md

+14-5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3
1616
- [Getting Started](#getting-started)
1717
- [Installation](#installation)
1818
- [Compatibility](#compatibility)
19+
- [Parse Server](#parse-server)
1920
- [Node.js](#nodejs)
2021
- [AWS Credentials](#aws-credentials)
2122
- [Deprecated Configuration](#deprecated-configuration)
@@ -37,6 +38,14 @@ The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3
3738

3839
## Compatibility
3940

41+
### Parse Server
42+
43+
| Version | End-of-Life | Compatible |
44+
|---------|---------------|------------|
45+
| <=5 | December 2023 | ✅ Yes |
46+
| 6 | December 2024 | ✅ Yes |
47+
| 7 | December 2025 | ✅ Yes |
48+
4049
### Node.js
4150

4251
This product is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date.
@@ -88,11 +97,11 @@ The preferred method is to use the default AWS credentials pattern. If no AWS c
8897

8998
*(This list is still incomplete and in the works, in the meantime find more descriptions in the chapters below.)*
9099

91-
| Parameter | Optional | Default value | Environment variable | Description |
92-
|-----------|----------|---------------|----------------------|-------------|
93-
| `fileAcl` | yes | `undefined` | S3_FILE_ACL | Sets the [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) of the file when storing it in the S3 bucket. Setting this parameter overrides the file ACL that would otherwise depend on the `directAccess` parameter. Setting the value `'none'` causes any ACL parameter to be removed that would otherwise be set. |
94-
| `presignedUrl` | yes | `false` | S3_PRESIGNED_URL | If `true` a [presigned URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) is returned when requesting the URL of file. The URL is only valid for a specified duration, see parameter `presignedUrlExpires`. |
95-
| `presignedUrlExpires` | yes | `undefined` | S3_PRESIGNED_URL_EXPIRES | Sets the duration in seconds after which the [presigned URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) of the file expires. If no value is set, the AWS S3 SDK default [Expires](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property) value applies. This parameter requires `presignedUrl` to be `true`. |
100+
| Parameter | Optional | Default value | Environment variable | Description |
101+
|-----------------------|----------|---------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
102+
| `fileAcl` | yes | `undefined` | S3_FILE_ACL | Sets the [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) of the file when storing it in the S3 bucket. Setting this parameter overrides the file ACL that would otherwise depend on the `directAccess` parameter. Setting the value `'none'` causes any ACL parameter to be removed that would otherwise be set. |
103+
| `presignedUrl` | yes | `false` | S3_PRESIGNED_URL | If `true` a [presigned URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) is returned when requesting the URL of file. The URL is only valid for a specified duration, see parameter `presignedUrlExpires`. |
104+
| `presignedUrlExpires` | yes | `undefined` | S3_PRESIGNED_URL_EXPIRES | Sets the duration in seconds after which the [presigned URL](https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) of the file expires. If no value is set, the AWS S3 SDK default [Expires](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property) value applies. This parameter requires `presignedUrl` to be `true`. |
96105

97106
## Using a Config File
98107

0 commit comments

Comments
 (0)