diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index d21fc7027..2d6d627e6 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -115,7 +115,7 @@ jobs: cd ../optics-xapps npm run lint - test: + solidity-test: env: ETHERSCAN_API_KEY: "" @@ -171,3 +171,60 @@ jobs: # Test - name: Test run: ./scripts/test-solidity.sh + + typescript-test: + env: + ETHERSCAN_API_KEY: "" + + runs-on: ubuntu-latest + needs: [install] + + steps: + - uses: actions/checkout@v2 + + # Get caches + - name: Core Cache + id: core-cache + uses: actions/cache@v2 + with: + path: ./solidity/optics-core/node_modules + key: ${{ runner.os }}-core-cache-${{ hashFiles('solidity/optics-core/package-lock.json') }} + + - name: XApps Cache + id: xapps-cache + uses: actions/cache@v2 + with: + path: ./solidity/optics-xapps/node_modules + key: ${{ runner.os }}-xapps-cache-${{ hashFiles('solidity/optics-xapps/package-lock.json') }} + + - name: Tests Cache + id: tests-cache + uses: actions/cache@v2 + with: + path: ./typescript/optics-tests/node_modules + key: ${{ runner.os }}-tests-cache-${{ hashFiles('typescript/optics-tests/package-lock.json') }} + + - name: Deploy Cache + id: deploy-cache + uses: actions/cache@v2 + with: + path: ./typescript/optics-deploy/node_modules + key: ${{ runner.os }}-deploy-cache-${{ hashFiles('typescript/optics-deploy/package-lock.json') }} + + - name: Typechain Cache + id: typechain-cache + uses: actions/cache@v2 + with: + path: ./typescript/typechain/node_modules + key: ${{ runner.os }}-typechain-cache-${{ hashFiles('typescript/typechain/package-lock.json') }} + + - name: Multi-Provider Cache + id: provider-cache + uses: actions/cache@v2 + with: + path: ./typescript/optics-provider/node_modules + key: ${{ runner.os }}-provider-cache-${{ hashFiles('typescript/optics-provider/package-lock.json') }} + + # Test + - name: optics-deploy build + run: cd ./typescript/optics-deploy && npm run build \ No newline at end of file diff --git a/typescript/optics-deploy/src/provider.ts b/typescript/optics-deploy/src/provider.ts index c45277b93..182e67ef1 100644 --- a/typescript/optics-deploy/src/provider.ts +++ b/typescript/optics-deploy/src/provider.ts @@ -1,20 +1,20 @@ -import { ExistingBridgeDeploy } from './bridge/BridgeDeploy'; -import { ExistingCoreDeploy } from './core/CoreDeploy'; +import { BridgeDeploy } from './bridge/BridgeDeploy'; +import { CoreDeploy } from './core/CoreDeploy'; import { writeFileSync } from 'fs'; import { resolve } from 'path'; import { AllConfigs } from './config'; export function updateProviderDomain( environment: string, - path: string, + directory: string, configs: AllConfigs[], ) { let ret = "import { OpticsDomain } from './domain';\n" const coreDeploys = configs.map( - (_) => new ExistingCoreDeploy(path, _.chain, _.coreConfig), + (_) => CoreDeploy.fromDirectory(directory, _.chain, _.coreConfig), ); const bridgeDeploys = configs.map( - (_) => new ExistingBridgeDeploy(_.chain, _.bridgeConfig, path), + (_) => BridgeDeploy.fromDirectory(directory, _.chain, _.bridgeConfig), ); for (let i = 0; i < configs.length; i++) {