diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index b5ae8db..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,20 +0,0 @@ -on: [push, pull_request] -name: Continuous Integration -jobs: - build: - name: Test Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js - uses: actions/setup-node@v1.1.0 - - - name: Test - run: make test - - - name: Publish coverage - uses: coverallsapp/github-action@v1.0.1 - with: - path-to-lcov: ./build/reports/coverage/lcov.info - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml index 652c5a1..efaf9de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,4 @@ jobs: - stage: Unit Test name: jest - script: make test + script: make test-ci diff --git a/Makefile b/Makefile index 28a5208..1bfe31d 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,24 @@ -BIN = ./node_modules/.bin -PKG = lib node_modules +bin = ./node_modules/.bin +jest = $(bin)/jest +coveralls = $(bin)/coveralls +pkg = lib node_modules -test: $(PKG) +test: $(pkg) @npm test -test-debug: $(PKG) - @node --inspect-brk node_modules/.bin/jest --runInBand --forceExit -test-watch: $(PKG) +test-debug: $(pkg) + @node --inspect-brk $(jest) --runInBand --forceExit +test-watch: $(pkg) @npm test -- --watchAll -test-types: $(PKG) +test-types: $(pkg) @npm run test:types -docs: $(PKG) +test-ci: test-cov-ci +test-cov-ci: test + @cat ./build/reports/coverage/lcov.info | $(coveralls) + +docs: $(pkg) @npm run storybook -docs-build: $(PKG) +docs-build: $(pkg) @npm run build-storybook publish: lib clean node_modules @@ -24,4 +30,4 @@ node_modules: package.json clean: @rm -rf build lib-dist node_modules -.PHONY: clean publish test test-ci test-debug docs docs-build docs-deploy test-types +.PHONY: clean publish test test-ci test-debug docs docs-build docs-deploy test-types test-ci test-cov-ci diff --git a/package-lock.json b/package-lock.json index fb55509..f077cde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10439,6 +10439,19 @@ "parse-json": "^4.0.0" } }, + "coveralls": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.0.tgz", + "integrity": "sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==", + "dev": true, + "requires": { + "js-yaml": "^3.13.1", + "lcov-parse": "^1.0.0", + "log-driver": "^1.2.7", + "minimist": "^1.2.5", + "request": "^2.88.2" + } + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -19369,6 +19382,12 @@ "invert-kv": "^2.0.0" } }, + "lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", + "dev": true + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -19545,6 +19564,12 @@ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", "dev": true }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "lolex": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", @@ -22730,13 +22755,14 @@ "fsevents": "^1.2.9", "intersect": "^1.0.1", "jsonp": "^0.2.1", + "koa-better-http-proxy": "^0.2.4", "load-script": "^1.0.0", "lodash.chunk": "^4.2.0", "lodash.isempty": "^4.4.0", "lodash.pick": "^4.4.0", "nanoid": "^2.1.9", "promise": "^8.0.3", - "qs": "^6.9.1", + "qs": "^6.9.3", "string-squish": "^1.0.3", "tabbable": "^4.0.0", "to-slug-case": "^1.0.0" diff --git a/package.json b/package.json index d715f18..ef359ab 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@storybook/react": "^5.3.18", "@testing-library/react-hooks": "^3.2.1", "babel-loader": "^8.1.0", + "coveralls": "^3.1.0", "dtslint": "^3.5.1", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2",