Page MenuHomePhabricator

[cashtab] use npm ci instead of install on CI
ClosedPublic

Authored by majcosta on Jan 8 2021, 12:11.

Details

Summary

npm ci will clean node_modules directory and install dependencies from
package-lock.json file, ensuring builds are deterministic.

this should also be the workflow for building the app locally to
develop as to avoid spurious repo changes when the package.json file has
not been altered

Test Plan
run on CI and check logs

Diff Detail

Repository
rABC Bitcoin ABC
Branch
npm_ci
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14669
Build 29297: Build Diff
Build 29296: arc lint + arc unit

Event Timeline

majcosta requested review of this revision.Jan 8 2021, 12:11
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

investigating bustedness

alcipir requested changes to this revision.Jan 8 2021, 13:06
alcipir added a subscriber: alcipir.

Can you add these instructions to the README? (instead of npm install, npm ci)

Can you add these instructions to the README? (instead of npm install, npm ci)

I'll limit this to CI only for now since I know it builds there with no issues.

fixed backports installation erroring out and fixed the issue with npm breaking when trying to talk to github via ssh

Failed tests logs:

====== CashTab Unit Tests: useBCH hook gets SLP and BCH balances and utxos ======
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 4
+ Received  + 4

@@ -21,11 +21,11 @@
        "satoshis": 546,
        "tokenDocumentHash": "",
        "tokenDocumentUrl": "mint.bitcoin.com",
        "tokenId": "009ff65ef50632111a9661f67d80025481ebc80ced239d32a92705b04d5df8cc",
        "tokenName": "TT",
-       "tokenQty": 7,
+       "tokenQty": "7",
        "tokenTicker": "TTT",
        "tokenType": 1,
        "transactionType": "send",
        "tx_hash": "bb055d815e795d7a4fe41fd67288d71886678e7d1e5ba9ddd7f6daffa5f70ceb",
        "tx_pos": 2,
@@ -42,11 +42,11 @@
        "satoshis": 546,
        "tokenDocumentHash": "",
        "tokenDocumentUrl": "mint.bitcoin.com",
        "tokenId": "2aef6e63edfded1a299e78b529286deea2a6dd5299b6911778c25632d78a9479",
        "tokenName": "pitico",
-       "tokenQty": 99.35,
+       "tokenQty": "99.35",
        "tokenTicker": "PTC",
        "tokenType": 1,
        "transactionType": "send",
        "tx_hash": "88b7dac07cb30566a6264f330bedda690c8dff151c2307692c79e13dc59ca2ba",
        "tx_pos": 2,
@@ -68,11 +68,11 @@
          "satoshis": 546,
          "tokenDocumentHash": "",
          "tokenDocumentUrl": "mint.bitcoin.com",
          "tokenId": "009ff65ef50632111a9661f67d80025481ebc80ced239d32a92705b04d5df8cc",
          "tokenName": "TT",
-         "tokenQty": 7,
+         "tokenQty": "7",
          "tokenTicker": "TTT",
          "tokenType": 1,
          "transactionType": "send",
          "tx_hash": "bb055d815e795d7a4fe41fd67288d71886678e7d1e5ba9ddd7f6daffa5f70ceb",
          "tx_pos": 2,
@@ -94,11 +94,11 @@
          "satoshis": 546,
          "tokenDocumentHash": "",
          "tokenDocumentUrl": "mint.bitcoin.com",
          "tokenId": "2aef6e63edfded1a299e78b529286deea2a6dd5299b6911778c25632d78a9479",
          "tokenName": "pitico",
-         "tokenQty": 99.35,
+         "tokenQty": "99.35",
          "tokenTicker": "PTC",
          "tokenType": 1,
          "transactionType": "send",
          "tx_hash": "88b7dac07cb30566a6264f330bedda690c8dff151c2307692c79e13dc59ca2ba",
          "tx_pos": 2,
    at Object.it (/work/web/cashtab/src/hooks/__tests__/useBCH.test.js:75:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Each failure log is accessible here:
CashTab Unit Tests: useBCH hook gets SLP and BCH balances and utxos

This revision is now accepted and ready to land.Jan 8 2021, 16:05