Browse Source

fix: make sure CI is recompiling the /lib folder when we make changes (#53)

## Problem

When changing the Typescript files, yarn build was not running in the
CI, leading to the CI's test succeeding even if we just introduced a
bug.

## Solution

Make the CI run `yarn build` before testing
crypto-vincent 1 year ago
parent
commit
9fd40403dc
2 changed files with 12 additions and 5 deletions
  1. 11 4
      .github/workflows/run-tests.yml
  2. 1 1
      clients/bolt-sdk/README.md

+ 11 - 4
.github/workflows/run-tests.yml

@@ -35,7 +35,7 @@ jobs:
       - name: Cache node dependencies
         uses: actions/cache@v3
         with:
-          path: '**/node_modules'
+          path: "**/node_modules"
           key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
 
       - name: install node_modules
@@ -84,7 +84,7 @@ jobs:
       - name: Cache node dependencies
         uses: actions/cache@v4
         with:
-          path: '**/node_modules'
+          path: "**/node_modules"
           key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
 
       - name: Run lint
@@ -113,8 +113,9 @@ jobs:
       - name: Cache node dependencies
         uses: actions/cache@v3
         with:
-          path: '**/node_modules'
+          path: "**/node_modules"
           key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
+
       - name: install node_modules
         run: |
           export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
@@ -159,6 +160,12 @@ jobs:
           cargo install --path cli --force --locked
           bolt test
 
+      - name: Generate lib
+        run: |
+          cd clients/bolt-sdk
+          yarn build
+          cd ../..
+
       - name: Install the Bolt CLI and create & build a new project
         shell: bash
         run: |
@@ -172,4 +179,4 @@ jobs:
           cargo update
           yarn add file:../clients/bolt-sdk/ -D # Overrides the bolt ts SDK with the local version
           bolt build
-          bolt test
+          bolt test

+ 1 - 1
clients/bolt-sdk/README.md

@@ -12,7 +12,7 @@ npm install @magicblock-labs/bolt-sdk
 
 ## Contributing
 
-The community is encouraged to contribute to the Soar SDK.
+The community is encouraged to contribute to the BOLT SDK.
 
 Fixes and features are always welcome! Please feel free to submit a PR for review.