diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..87d1e27 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,30 @@ +name: Flow check, Lint and Tests + +on: push + +jobs: + validation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - 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- + - name: Install dependencies + run: npm install + - name: Lint + run: npm run lint + - name: Tests + run: npm run test:only + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6ea870d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: node_js - -# https://github.com/nodejs/LTS -node_js: - - '12' - - '10' - - '8' - -git: - depth: 5 - -cache: yarn - -script: - - if [[ "$TRAVIS_JOB_NUMBER" == *.1 ]]; then npm run test:ci; else npm run testonly; fi - -jobs: - include: - - stage: deploy - if: tag IS present - script: echo "Deploying..." - node_js: '12' - deploy: - provider: npm - skip_cleanup: true - email: lee@leebyron.com - api_key: - secure: nSGc6vlrEBM7vngiA1YdwlZsFLPVkmXuoVnHpFLmlQ8602Fg10yBJhab6a5SzJO11OGZCF58pUOK5VZn+gz5QLZn+MsOvCl8q8Y+wwtEe6vDtGuD3LI1Hw7zjBXGAlkZ418/MLye2aXAShrYzGOtbnFn2AYYZTyR6hqFSBBqktXsG3E6ZHNe4paJz09YTslD7Yk/mv4uitbxXRwNKe4GX3gddKiGRc5EgKSIrSqBg19lhaOvL30HvMybosJAHEs0Er/U4SQiKaYOd3bdeABPe4syBpo76YfgQJQNZdXq2MRZxEnCs8hniCw8rAPm1Q/yv3FVG6N9IPk23BEezk6ah4vp6p1uMCiwpS1+LQ3/hYs7sjiswWkK2Tg4WN6jmTYMfPfEGpPDsgwyCRcL9I9ovDl/nbDLlXiseRqFsSkM49SJXBMJa+EuQNgfPbT+zEdZFdKCFe9fmD2f2yPaVG5tvF7j/HyZE0FTfLkAeKdPLvnM7U3w81Bfpzfuz2KywjiR/C6LqjV1J8ioBlhpBtbnahCTj5d+jIfeR0Oc00np9w0DJAFSfHTXSBXzhvTHtZ0AKdvalzimJKREfy50ABPPbtbUlNnSkoyLjlxKUpp0kbZBnlu+kVcoEyIFiNhg8T+s28Wv8fYVUiJ7PihpUxB9QVD6iTvmYFftusNZJnfZZTk= - on: - tags: true - branch: master - repo: graphql/dataloader diff --git a/package.json b/package.json index 2a4c66a..fa50c0a 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,12 @@ "typings": "index.d.ts", "scripts": { "test": "npm run lint && npm run check && npm run testonly", - "test:ci": "npm run lint && npm run check && npm run testonly:coveralls", + "test:ci": "npm run lint && npm run check && npm run testonly -- --coverage", "lint": "eslint src", "check": "flow check --max-warnings 0", "build": "babel src --ignore src/__tests__ --out-dir dist/ ; cp src/index.js dist/index.js.flow ; cp src/index.d.ts dist/", "watch": "babel resources/watch.js | node", "testonly": "jest src", - "testonly:coveralls": "jest src --coverage && cat ./coverage/lcov.info | coveralls", "preversion": ". ./resources/checkgit.sh && npm test", "prepublish": ". ./resources/prepublish.sh" }, @@ -45,7 +44,6 @@ "@babel/preset-env": "7.7.1", "@babel/preset-flow": "7.0.0", "babel-eslint": "10.0.3", - "coveralls": "3.0.7", "eslint": "6.6.0", "flow-bin": "0.112.0", "jest": "24.9.0", diff --git a/yarn.lock b/yarn.lock index 056aa62..e5a20d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1488,18 +1488,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -coveralls@3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.7.tgz#1eca48e47976e9573d6a2f18b97c2fea4026f34a" - integrity sha512-mUuH2MFOYB2oBaA4D4Ykqi9LaEYpMMlsiOMJOrv358yAjP6enPIk55fod2fNJ8AvwoYXStWQls37rA+s5e7boA== - dependencies: - growl "~> 1.10.0" - js-yaml "^3.13.1" - lcov-parse "^0.0.10" - log-driver "^1.2.7" - minimist "^1.2.0" - request "^2.86.0" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2151,11 +2139,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== -"growl@~> 1.10.0": - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -3098,11 +3081,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lcov-parse@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= - left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -3149,11 +3127,6 @@ lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -3933,7 +3906,7 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.86.0, request@^2.87.0: +request@^2.87.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==