diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac248f0..eea450b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,43 +12,53 @@ on: jobs: test: runs-on: ubuntu-latest - + env: + NODE_OPTIONS: --max-old-space-size=8192 strategy: fail-fast: false matrix: - node-version: [8.x ,14.x ,16.x] + node-version: [14.x ,16.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm install - - run: npm run build --if-present - - run: npm run test + + - run: | + npm install + npm run build --if-present + npm run ci + env: + NODE_OPTIONS: --max-old-space-size=8192 code-coverage: runs-on: ubuntu-latest + env: + NODE_OPTIONS: --max-old-space-size=8192 strategy: fail-fast: false matrix: - node-version: [ 8.x ] + node-version: [ 14.x ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm install - - run: npm run build --if-present - - run: npm run test-coverage + - run: | + npm install + npm run build --if-present + npm run test-coverage + env: + NODE_OPTIONS: --max-old-space-size=8192 - name: Coveralls uses: coverallsapp/github-action@master diff --git a/package.json b/package.json index 25a08ab..8b1dbf0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A library to manage users, transfer methods and payments through the Hyperwallet API", "main": "lib/index.js", "dependencies": { - "form-data": "^3.0.0", + "form-data": "^3.0.4", "node-jose": "^2.2.0", "object-assign": "^4.1.0", "superagent": "^4.0.0", @@ -16,7 +16,9 @@ "docs": "esdoc -c ./.esdoc.json", "deploy-docs": "npm run docs && gh-pages -d docs", "test": "npm run lint && npm run test-unit", - "test-unit": "nyc --reporter lcov mocha --require babel-core/register test/**/*.js test/*.js", + "ci": "npm run lint && npm run test-unit-ci", + "test-unit-ci": "mocha --parallel --jobs 1 --bail --require babel-core/register test/**/*.js test/*.js", + "test-unit": "nyc --reporter lcov mocha --parallel --jobs 1 --require babel-core/register test/**/*.js test/*.js", "test-coverage": "nyc npm run test", "coveralls": "npm run test-coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "prepublish-prod": "npm test && npm run prod", @@ -43,7 +45,7 @@ }, "homepage": "http://hyperwallet.github.io/node-sdk", "devDependencies": { - "babel-eslint": "^8.2.6", + "babel-eslint": "^10.1.0", "babel-preset-es2015": "^6.9.0", "babel-preset-stage-0": "^6.5.0", "babel-register": "^6.9.0", @@ -56,7 +58,7 @@ "eslint-config-airbnb-base": "^13.2.0", "eslint-plugin-import": "^2.17.2", "gh-pages": "^6.1.1", - "mocha": "^5.2.0", + "mocha": "^10.4.0", "nock": "^10.0.4", "nyc": "^15.0.0", "publish-please": "^5.4.3",