From 9fd40403dc65d9a00fa6cbac8455e5e202cdd020 Mon Sep 17 00:00:00 2001 From: crypto-vincent Date: Fri, 14 Jun 2024 11:52:07 +0100 Subject: [PATCH] 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 --- .github/workflows/run-tests.yml | 15 +++++++++++---- clients/bolt-sdk/README.md | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ab5dd4b..2cf8ae3 100644 --- a/.github/workflows/run-tests.yml +++ b/.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 \ No newline at end of file + bolt test diff --git a/clients/bolt-sdk/README.md b/clients/bolt-sdk/README.md index 16c479a..43e2e11 100644 --- a/clients/bolt-sdk/README.md +++ b/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.