From 9dee375631389dbad01627b3778b69b6a3d6b95c Mon Sep 17 00:00:00 2001 From: Marccio Silva Date: Fri, 13 Aug 2021 12:15:44 -0300 Subject: [PATCH] Add code coverage step to circle CI pipeline, add coveralls orb, update circleci config version --- .circleci/config.yml | 12 ++++++-- bridge/package-lock.json | 63 ++++++++++++++++++++++++++++++++++++++++ bridge/package.json | 5 ++-- 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c109373f5..9f76e71d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,6 @@ -version: 2 +version: 2.1 +orbs: + coveralls: coveralls/coveralls@1.0.6 jobs: build: working_directory: ~/repo @@ -23,6 +25,13 @@ jobs: command: | cd bridge npm ci + - run: + name: bridge coverage + command: | + cd bridge + npm run coverage + - coveralls/upload: + path_to_lcov: "./bridge/coverage" - run: name: install federator dependencies command: | @@ -57,4 +66,3 @@ jobs: command: | cd bridge npm test - \ No newline at end of file diff --git a/bridge/package-lock.json b/bridge/package-lock.json index dada23e30..19655c698 100644 --- a/bridge/package-lock.json +++ b/bridge/package-lock.json @@ -23,6 +23,7 @@ }, "devDependencies": { "axios": ">=0.21.1", + "coveralls": "^3.1.1", "css-what": ">=5.0.1", "elliptic": ">=6.5.4", "glob-parent": ">=5.1.2", @@ -8479,6 +8480,25 @@ "node": ">=4" } }, + "node_modules/coveralls": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", + "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "dev": true, + "dependencies": { + "js-yaml": "^3.13.1", + "lcov-parse": "^1.0.0", + "log-driver": "^1.2.7", + "minimist": "^1.2.5", + "request": "^2.88.2" + }, + "bin": { + "coveralls": "bin/coveralls.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/crc-32": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", @@ -14936,6 +14956,15 @@ "node": ">=0.10.0" } }, + "node_modules/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, + "bin": { + "lcov-parse": "bin/cli.js" + } + }, "node_modules/leb128": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/leb128/-/leb128-0.0.5.tgz", @@ -15534,6 +15563,15 @@ "resolved": "https://registry.npmjs.org/lodash.zipwith/-/lodash.zipwith-4.2.0.tgz", "integrity": "sha1-r6zwP9LzhK8p4mPDxr2juA4/Uf0=" }, + "node_modules/log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true, + "engines": { + "node": ">=0.8.6" + } + }, "node_modules/log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -30756,6 +30794,19 @@ "parse-json": "^4.0.0" } }, + "coveralls": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", + "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", + "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" + } + }, "crc-32": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", @@ -35971,6 +36022,12 @@ "invert-kv": "^1.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 + }, "leb128": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/leb128/-/leb128-0.0.5.tgz", @@ -36517,6 +36574,12 @@ "resolved": "https://registry.npmjs.org/lodash.zipwith/-/lodash.zipwith-4.2.0.tgz", "integrity": "sha1-r6zwP9LzhK8p4mPDxr2juA4/Uf0=" }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", diff --git a/bridge/package.json b/bridge/package.json index 2c8486326..c59ecf032 100644 --- a/bridge/package.json +++ b/bridge/package.json @@ -38,9 +38,9 @@ "@truffle/hdwallet-provider": "^1.4.0", "chalk": "^4.1.0", "eth-gas-reporter": "^0.2.22", - "solhint": "^3.3.6", "npm-force-resolutions": "0.0.3", "resolve": "^1.13.0", + "solhint": "^3.3.6", "solidity-coverage": "^0.7.16", "table": "^6.0.3", "truffle": "^5.3.9", @@ -48,12 +48,13 @@ "truffle-plugin-verify": "^0.5.9" }, "devDependencies": { - "web3": ">=1.0.0", "axios": ">=0.21.1", + "coveralls": "^3.1.1", "css-what": ">=5.0.1", "elliptic": ">=6.5.4", "glob-parent": ">=5.1.2", "node-fetch": ">=2.6.1", + "web3": ">=1.0.0", "y18n": ">=5.0.5" }, "resolutions": {