Fix fork tests 2 (#2063)

- Fix an issue where `pick` inserts a key into an object.
- Skip fork testing ICAs/IQS due to the IGP mismatch error
pull/2072/head
Asa Oines 2 years ago committed by GitHub
parent e87095dc18
commit 5a6a753de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/node.yml
  2. 16
      typescript/infra/scripts/deploy.ts
  3. 5
      typescript/sdk/src/utils/objects.ts

@ -115,7 +115,7 @@ jobs:
strategy:
matrix:
environment: [testnet3, mainnet2]
module: [core, igp, ica, iqs]
module: [core, igp]
steps:
- uses: actions/checkout@v3

@ -121,13 +121,15 @@ async function main() {
read: environment !== 'test',
write: true,
};
const agentConfig = ['core', 'igp'].includes(module)
? {
addresses,
environment,
multiProvider,
}
: undefined;
// Don't write agent config in fork tests
const agentConfig =
['core', 'igp'].includes(module) && !fork
? {
addresses,
environment,
multiProvider,
}
: undefined;
await deployWithArtifacts(deployer, cache, fork, agentConfig);
}

@ -40,8 +40,11 @@ export function promiseObjAll<K extends string, V>(obj: {
// Get the subset of the object from key list
export function pick<K extends string, V = any>(obj: Record<K, V>, keys: K[]) {
const ret: Partial<Record<K, V>> = {};
const objKeys = Object.keys(obj);
for (const key of keys) {
ret[key] = obj[key];
if (objKeys.includes(key)) {
ret[key] = obj[key];
}
}
return ret as Record<K, V>;
}

Loading…
Cancel
Save