From 021b6e975f6a263b96074502cabe4baf0eb6f875 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 30 Aug 2019 10:36:23 +0200 Subject: Add testing --- .circleci/config.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .circleci/config.yml (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..447bd4b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,33 @@ +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: circleci/node:12.7.10 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/mongo:3.4.4 + + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: npm install + + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + # run tests! + - run: npm test -- cgit 1.4.1 From 689786618070565e1c62308818140c336877ac92 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 30 Aug 2019 10:43:09 +0200 Subject: Fix circleci image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 447bd4b..451b37e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: docker: # specify the version you desire here - - image: circleci/node:12.7.10 + - image: circleci/node:latest # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images -- cgit 1.4.1 From 1922679f73fb017e34517bc6e7aa61e100bdfb8f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 31 Aug 2019 12:05:07 +0200 Subject: Add coverage to ci --- .circleci/config.yml | 5 ++++- package-lock.json | 40 ++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 451b37e..378162a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: npm install + - run: npm install && npm install -g coveralls - save_cache: paths: @@ -31,3 +31,6 @@ jobs: # run tests! - run: npm test + + # upload coverage + - run: jest --coverage --coverageReporters=text-lcov | coveralls diff --git a/package-lock.json b/package-lock.json index 20003c5..538b1bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3872,6 +3872,28 @@ "parse-json": "^4.0.0" } }, + "coveralls": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.6.tgz", + "integrity": "sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -5447,6 +5469,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -7560,6 +7588,12 @@ "launch-editor": "^2.2.1" } }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -7704,6 +7738,12 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", diff --git a/package.json b/package.json index 493362f..09d2b6b 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@vue/test-utils": "^1.0.0-beta.27", "babel-jest": "^24.1.0", + "coveralls": "^3.0.6", "eslint-config-prettier": "^4.1.0", "eslint-plugin-prettier": "^3.0.1", "jest": "^24.1.0", -- cgit 1.4.1 From 01ddee16e8b22e904c22b39433519b6b34182621 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 31 Aug 2019 12:07:18 +0200 Subject: Fix circleci config --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 378162a..ab52af9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: npm install && npm install -g coveralls + - run: npm install -D - save_cache: paths: @@ -33,4 +33,4 @@ jobs: - run: npm test # upload coverage - - run: jest --coverage --coverageReporters=text-lcov | coveralls + - run: jest --coverage --coverageReporters=text-lcov | npx coveralls -- cgit 1.4.1 From 89a60dbbbadee2fbccddddc47e92aaf8dce6525a Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 31 Aug 2019 12:08:44 +0200 Subject: Fix jest command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index ab52af9..d16b587 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,4 +33,4 @@ jobs: - run: npm test # upload coverage - - run: jest --coverage --coverageReporters=text-lcov | npx coveralls + - run: npm test -- --coverage --coverageReporters=text-lcov | npx coveralls -- cgit 1.4.1