Page MenuHomePhabricator

[ecash-lib] Support publishing npm pkgs in CI
DraftPublic

Authored by bytesofman on Thu, Apr 25, 23:11.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Add a Dockerfile to build ecash-lib and publish it to npm. CI will handle making sure that ecash-lib-wasm is in place (with matching checksum) and that we only publish on version bumps.

Test Plan

docker build -t ecash-lib_local .

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecash-lib-ci-publish
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28763
Build 57064: Build Diffecash-lib-integration-tests · ecash-lib-tests
Build 57063: arc lint + arc unit

Event Timeline

remove local install of chronik-client

Tail of the build log:

found 0 vulnerabilities

> ecash-lib@0.1.0 integration-tests
> mocha --import=tsx ./tests/*.test.ts --timeout 60000 --reporter mocha-junit-reporter --reporter-options mochaFile=test_results/ecash-lib-integration-tests-junit.xml --reporter-options testsuitesTitle=Ecash Lib Integration Tests --reporter-options rootSuiteTitle=Ecash Lib

Test runner started
2024-04-25T23:41:31.253000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240425_234131/setup_scripts/ecash-lib_base_0
Setting chronik url to  http://127.0.0.1:28001
2024-04-25T23:41:31.817000Z TestFramework (INFO): Passed test setup data to mocha
Test runner started
2024-04-25T23:41:31.927000Z TestFramework (INFO): Received a stop message, exiting
2024-04-25T23:41:31.977000Z TestFramework (INFO): Stopping nodes
Test runner completed with code 1
---------------------|---------|----------|---------|---------|-------------------
File                 | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------|---------|----------|---------|---------|-------------------
All files            |       0 |        0 |       0 |       0 |                   
 ecash-lib           |       0 |        0 |       0 |       0 |                   
  eslint.config.js   |       0 |        0 |       0 |       0 |                   
 ecash-lib/src       |       0 |        0 |       0 |       0 |                   
  ecc.ts             |       0 |      100 |       0 |       0 | 23-38             
  hash.ts            |       0 |      100 |     100 |       0 | 7-9               
  index.ts           |       0 |        0 |       0 |       0 |                   
  op.ts              |       0 |        0 |       0 |       0 | 33-124            
  opcode.ts          |       0 |      100 |     100 |       0 | 10-154            
  script.ts          |       0 |        0 |       0 |       0 | 26-158            
  sigHashType.ts     |       0 |        0 |       0 |       0 | 19-166            
  tx.ts              |       0 |        0 |       0 |       0 | 20-163            
  txBuilder.ts       |       0 |        0 |       0 |       0 | 67-238            
  unsignedTx.ts      |       0 |        0 |       0 |       0 | 38-229            
 ecash-lib/src/ffi   |       0 |        0 |       0 |       0 |                   
  ecash_lib_wasm.js  |       0 |        0 |       0 |       0 | 3-336             
 ecash-lib/src/io    |       0 |        0 |       0 |       0 |                   
  bytes.ts           |       0 |        0 |       0 |       0 | 13-64             
  hex.ts             |       0 |        0 |       0 |       0 | 5-68              
  int.ts             |       0 |        0 |       0 |       0 |                   
  str.ts             |       0 |      100 |       0 |       0 | 5-9               
  varsize.ts         |       0 |        0 |       0 |       0 | 14-47             
  writer.ts          |       0 |        0 |       0 |       0 |                   
  writerbytes.ts     |       0 |        0 |       0 |       0 | 21-79             
  writerlength.ts    |       0 |      100 |       0 |       0 | 16-41             
 ecash-lib/src/token |       0 |        0 |       0 |       0 |                   
  alp.ts             |       0 |        0 |       0 |       0 | 13-145            
  common.ts          |       0 |      100 |     100 |       0 | 9-12              
  empp.ts            |       0 |        0 |       0 |       0 | 11-28             
---------------------|---------|----------|---------|---------|-------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='792']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='273']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='126']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='776']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1