Page MenuHomePhabricator

[ecashaddrjs] Add unit tests to CI
ClosedPublic

Authored by bytesofman on Apr 11 2023, 21:17.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC747125615c97: [ecashaddrjs] Add unit tests to CI
Summary

T3044

Add ecashaddrjs unit test to CI

Test Plan

./contrib/teamcity/build-configurations.py ecashaddrjs-tests

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tail of the build log:

    at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/work/modules/ecashaddrjs/node_modules/bs58check/index.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/work/modules/ecashaddrjs/src/cashaddr.js:9:248)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/work/modules/ecashaddrjs/test/cashaddr.js:12:18)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
    at Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:201:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:154:23)
    at async Loader.import (node:internal/modules/esm/loader:177:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
    at async formattedImport (/work/modules/ecashaddrjs/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async Object.exports.requireOrImport (/work/modules/ecashaddrjs/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async Object.exports.loadFilesAsync (/work/modules/ecashaddrjs/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/work/modules/ecashaddrjs/node_modules/mocha/lib/cli/run-helpers.js:125:3)
    at async Object.exports.handler (/work/modules/ecashaddrjs/node_modules/mocha/lib/cli/run.js:370:5)
---------------|---------|----------|---------|---------|-------------------
File           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------|---------|----------|---------|---------|-------------------
All files      |    5.08 |        0 |       0 |    5.35 |                   
 base32.js     |      20 |        0 |       0 |   22.22 | 74-106            
 cashaddr.js   |    2.01 |        0 |       0 |    2.11 | 15-553            
 validation.js |      25 |        0 |       0 |      25 | 25-28,42-43       
---------------|---------|----------|---------|---------|-------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='9']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='177']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='70']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='24']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='9']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='168']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecashaddrjs-junit.xml': No such file or directory
Build ecashaddrjs-tests failed with exit code 1
Fabien requested changes to this revision.Apr 12 2023, 09:39

Tests are failing, back to your queue

This revision now requires changes to proceed.Apr 12 2023, 09:39

Tests are failing, back to your queue

The tests are failing because CI is using node js version 15.14.0, but the app requires node js version 16@latest

Error: Cannot find module 'node:crypto'

I guess this only started coming standard with nodejs in version 16.

Seems like CONTRIBUTING.md is already calling for nodejs 16 -- where can I find / adjust the version used by CI?

Note: this is also where a lot of these warnings are coming from in the build log, e.g.

[09:10:53][Step 1/1] npm WARN EBADENGINE Unsupported engine {
[09:10:53][Step 1/1] npm WARN EBADENGINE   package: '@eslint-community/eslint-utils@4.4.0',
[09:10:53][Step 1/1] npm WARN EBADENGINE   required: { node: '^12.22.0 || ^14.17.0 || >=16.0.0' },
[09:10:53][Step 1/1] npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
[09:10:53][Step 1/1] npm WARN EBADENGINE }

Can you please land D13686 and rebase on master ?

This revision is now accepted and ready to land.Apr 12 2023, 19:28
This revision was automatically updated to reflect the committed changes.