diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756e4e2419..b525062732 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: ci on: push: - branches: [ release, alpha, beta, next-major, 'release-[0-9]+.x.x' ] + branches: [release, alpha, beta, next-major, 'release-[0-9]+.x.x'] pull_request: branches: - '**' @@ -21,17 +21,17 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] steps: - - name: Checkout repository - uses: actions/checkout@v3 - - 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 + - name: Checkout repository + uses: actions/checkout@v3 + - 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 @@ -54,30 +54,30 @@ jobs: - 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@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 + name: Lint + timeout-minutes: 15 + runs-on: ubuntu-latest + 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-definitions: - name: Check Definitions - timeout-minutes: 5 - runs-on: ubuntu-latest - steps: + name: Check Definitions + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.NODE_VERSION }} uses: actions/setup-node@v2 @@ -95,25 +95,25 @@ jobs: - name: CI Definitions Check run: npm run ci:definitionsCheck check-circular: - name: Circular Dependencies - timeout-minutes: 5 - runs-on: ubuntu-latest - 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 + name: Circular Dependencies + timeout-minutes: 5 + runs-on: ubuntu-latest + 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 @@ -177,7 +177,7 @@ jobs: - name: Node 18 MONGODB_VERSION: 4.4.13 MONGODB_TOPOLOGY: standalone - NODE_VERSION: 18.12.1 + NODE_VERSION: 18.18.2 fail-fast: false name: ${{ matrix.name }} timeout-minutes: 15 @@ -186,7 +186,7 @@ jobs: redis: image: redis ports: - - 6379:6379 + - 6379:6379 env: MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }} MONGODB_TOPOLOGY: ${{ matrix.MONGODB_TOPOLOGY }} diff --git a/package.json b/package.json index 1248432259..ff9f9e2cea 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2", "test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2", "posttest:mongodb": "mongodb-runner stop", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=6.0.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start", "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine", "test": "npm run testonly", "posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner stop", diff --git a/spec/ParseGraphQLServer.spec.js b/spec/ParseGraphQLServer.spec.js index 3802f9e9be..7ed1714d3c 100644 --- a/spec/ParseGraphQLServer.spec.js +++ b/spec/ParseGraphQLServer.spec.js @@ -36,8 +36,6 @@ const { ParseGraphQLServer } = require('../lib/GraphQL/ParseGraphQLServer'); const { ReadPreference, Collection } = require('mongodb'); const { v4: uuidv4 } = require('uuid'); -const testAgent = new http.Agent(); - function handleError(e) { if (e && e.networkError && e.networkError.result && e.networkError.result.errors) { fail(e.networkError.result.errors); @@ -6874,7 +6872,6 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, - agent: testAgent, }); expect(res.status).toEqual(200); @@ -9338,7 +9335,6 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, - agent: testAgent, }); expect(res.status).toEqual(200); @@ -9451,7 +9447,6 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body: body2, - agent: testAgent, }); expect(res.status).toEqual(200); const result2 = JSON.parse(await res.text()); @@ -9644,7 +9639,6 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, - agent: testAgent, }); expect(res.status).toEqual(200); const result = await res.json(); @@ -9698,7 +9692,6 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, - agent: testAgent, }); const result = JSON.parse(await res.text());