diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0ec5de10..666d2f3d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,11 @@ jobs: with: node-version: 20 cache: "npm" + cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci + working-directory: wormhole-connect - run: npm run lint:ci + working-directory: wormhole-connect test: runs-on: ubuntu-latest @@ -30,9 +33,11 @@ jobs: with: node-version: 20 cache: "npm" + cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci - - run: npm run build -w sdk - - run: npm test -w wormhole-connect + working-directory: wormhole-connect + - run: npm test + working-directory: wormhole-connect env: REACT_APP_SOLANA_RPC: ${{ vars.REACT_APP_SOLANA_RPC }} @@ -43,7 +48,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Run script - run: cd wormhole-connect #&& npm i prettier && npm run checksdn + run: echo hi #npm i prettier && npm run checksdn + working-directory: wormhole-connect check-token-list: runs-on: ubuntu-latest @@ -54,9 +60,11 @@ jobs: with: node-version: 20 cache: "npm" + cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci - - run: npm run build -w sdk - - run: cd wormhole-connect && npx tsx scripts/checkForeignAssetsConfig.ts + working-directory: wormhole-connect + - run: npx tsx scripts/checkForeignAssetsConfig.ts + working-directory: wormhole-connect build-hosted: runs-on: ubuntu-latest @@ -66,8 +74,11 @@ jobs: with: node-version: 20 cache: "npm" + cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci + working-directory: wormhole-connect - run: npm run build:hosted + working-directory: wormhole-connect build-library: runs-on: ubuntu-latest @@ -77,5 +88,8 @@ jobs: with: node-version: 20 cache: "npm" + cache-dependency-path: "wormhole-connect/package-lock.json" - run: npm ci + working-directory: wormhole-connect - run: npm run build:lib + working-directory: wormhole-connect diff --git a/wormhole-connect/tests/ci/ntt.test.ts b/wormhole-connect/tests/ci/ntt.test.ts deleted file mode 100644 index a17f29069..000000000 --- a/wormhole-connect/tests/ci/ntt.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { describe, expect, test } from 'vitest'; -import { abiVersionMatches } from 'routes/ntt/utils'; - -describe('NTT ABI version matching', () => { - test('should return true if major versions match and target minor version is greater, ignoring patch version', () => { - expect(abiVersionMatches('1.1.0', '1.0.0')).toBeTruthy(); - }); - - test('should return true if major, minor, and patch versions match exactly', () => { - expect(abiVersionMatches('1.0.0', '1.0.0')).toBeTruthy(); - }); - - test('should return false if major versions do not match, ignoring minor and patch versions', () => { - expect(abiVersionMatches('1.0.0', '2.0.0')).toBeFalsy(); - }); - - test('should return false if major versions match but target minor version is less, ignoring patch version', () => { - expect(abiVersionMatches('1.0.0', '1.1.0')).toBeFalsy(); - }); - - test('should handle versions with more than one digit correctly, ignoring patch version', () => { - expect(abiVersionMatches('10.20.0', '10.15.5')).toBeTruthy(); - }); - - test('should return false if any version is not in correct format', () => { - expect(abiVersionMatches('1..0.0', '2.0.0')).toBeFalsy(); - expect(abiVersionMatches('1.0.0', '2..0.0')).toBeFalsy(); - }); -});