fix: cache build artefacts (#1091)

To speed up the build and make it more reliable, cache the node_modules
folder, dist, etc and re-use on each step.
This commit is contained in:
Alex Potsides
2021-12-29 15:06:58 +01:00
committed by GitHub
parent ef54e0a10e
commit 5043cd5643
5 changed files with 409 additions and 46 deletions

View File

@ -75,11 +75,11 @@ describe('peer-routing', () => {
it('should use the nodes dht', async () => {
sinon.stub(nodes[0]._dht, 'findPeer').callsFake(async function * () {
yield {
name: 'PEER_RESPONSE',
closer: [{
name: 'FINAL_PEER',
peer: {
id: nodes[1].peerId,
multiaddrs: []
}]
}
}
})
@ -448,10 +448,8 @@ describe('peer-routing', () => {
sinon.stub(node._dht, 'findPeer').callsFake(async function * () {
yield {
name: 'PEER_RESPONSE',
closer: [
result
]
name: 'FINAL_PEER',
peer: result
}
})
sinon.stub(delegate, 'findPeer').callsFake(async () => {
@ -477,10 +475,8 @@ describe('peer-routing', () => {
sinon.stub(node._dht, 'findPeer').callsFake(async function * () {
yield {
name: 'PEER_RESPONSE',
closer: [
result
]
name: 'FINAL_PEER',
peer: result
}
})
sinon.stub(delegate, 'findPeer').callsFake(() => {})