From 855de8f09ef41909dc65a51adf4b954272a51dd2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 18:06:11 -0700 Subject: ci: :green_heart: testing testing in ci --- .github/workflows/main.yaml | 84 ++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 40 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 03c33dba..9431e878 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,8 +3,7 @@ name: Publish Extension on: push: branches: - - main - - package-python + - ci-testing jobs: pyinstaller: @@ -99,43 +98,48 @@ jobs: cd extension/react-app npm ci --legacy-peer-deps - - name: Build and Publish + - name: Test extension run: | cd extension - npm run package - npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - - name: Commit changes - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git commit -am "ci: 💚 Update package.json version [skip ci]" - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} - - - name: Upload .vsix artifact - uses: actions/upload-artifact@v2 - with: - name: vsix-artifact - path: extension/build/* - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-west-2 - - - name: Upload binaries to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete - env: - AWS_S3_BUCKET: continue-server-binaries - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: "us-west-1" - SOURCE_DIR: "exe" + npm run test + + # - name: Build and Publish + # run: | + # cd extension + # npm run package + # npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "ci: 💚 Update package.json version [skip ci]" + + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} + + # - name: Upload .vsix artifact + # uses: actions/upload-artifact@v2 + # with: + # name: vsix-artifact + # path: extension/build/* + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v1 + # with: + # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # aws-region: us-west-2 + + # - name: Upload binaries to S3 + # uses: jakejarvis/s3-sync-action@master + # with: + # args: --acl public-read --follow-symlinks --delete + # env: + # AWS_S3_BUCKET: continue-server-binaries + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # AWS_REGION: "us-west-1" + # SOURCE_DIR: "exe" -- cgit v1.2.3-70-g09d2 From 64e107439df5aad8620ea1f1c1f03fb20e4b6112 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 18:25:38 -0700 Subject: ci: :green_heart: test on all platforms in ci --- .github/workflows/main.yaml | 133 ++++++++++++++++++++++++++++---------------- 1 file changed, 85 insertions(+), 48 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9431e878..1ef09d37 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -43,33 +43,42 @@ jobs: name: ${{ runner.os }} Build path: dist/* - publish: + test-and-package: needs: pyinstaller - runs-on: ubuntu-latest - permissions: - contents: write + strategy: + matrix: + os: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v2 + - name: Create exe directory + run: | + mkdir extension/server/exe + - name: Download Linux build uses: actions/download-artifact@v2 with: name: Linux Build - path: exe/linux + path: extension/server/exe/linux + if: matrix.os == 'ubuntu-20.04' - name: Download macOS build uses: actions/download-artifact@v2 with: name: macOS Build - path: exe/mac + path: extension/server/exe/mac + if: matrix.os == 'macos-latest' - name: Download Windows build uses: actions/download-artifact@v2 with: name: Windows Build - path: exe/windows + path: extension/server/exe/windows + if: matrix.os == 'windows-latest' - name: Use Node.js 19.0.0 uses: actions/setup-node@v3 @@ -98,48 +107,76 @@ jobs: cd extension/react-app npm ci --legacy-peer-deps - - name: Test extension + - name: Package the extension + run: | + cd extension + npm run package + + - name: Run extension tests run: | cd extension npm run test + + - name: Remove exe directory and re-package + run: | + cd extension + rm -rf server/exe + npm run package + + - Upload .vsix as an artifact + uses: actions/upload-artifact@v2 + with: + name: vsix-artifact + path: extension/build/* + if: matrix.os == 'ubuntu-20.04' + + + publish: + needs: test-and-package + runs-on: ubuntu-20.04 + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Download .vsix artifact + uses: actions/download-artifact@v2 + with: + name: vsix-artifact + path: extension/build - # - name: Build and Publish - # run: | - # cd extension - # npm run package - # npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "ci: 💚 Update package.json version [skip ci]" - - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} - - # - name: Upload .vsix artifact - # uses: actions/upload-artifact@v2 - # with: - # name: vsix-artifact - # path: extension/build/* - - # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v1 - # with: - # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # aws-region: us-west-2 - - # - name: Upload binaries to S3 - # uses: jakejarvis/s3-sync-action@master - # with: - # args: --acl public-read --follow-symlinks --delete - # env: - # AWS_S3_BUCKET: continue-server-binaries - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: "us-west-1" - # SOURCE_DIR: "exe" + - name: Publish + run: | + cd extension + npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "ci: 💚 Update package.json version [skip ci]" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: Upload binaries to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: continue-server-binaries + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: "us-west-1" + SOURCE_DIR: "exe" -- cgit v1.2.3-70-g09d2 From b4d59917cc3f0a30a56ef51ce11e6202cd01e0a1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 18:35:51 -0700 Subject: ci: :green_heart: fixes to ci --- .github/workflows/main.yaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1ef09d37..4f1e538c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -116,21 +116,20 @@ jobs: run: | cd extension npm run test - + - name: Remove exe directory and re-package run: | cd extension rm -rf server/exe npm run package - - Upload .vsix as an artifact + - name: Upload .vsix as an artifact uses: actions/upload-artifact@v2 with: name: vsix-artifact path: extension/build/* if: matrix.os == 'ubuntu-20.04' - publish: needs: test-and-package runs-on: ubuntu-20.04 @@ -163,12 +162,32 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} + # Download binaries and upload to S3 + + - name: Download Linux build + uses: actions/download-artifact@v2 + with: + name: Linux Build + path: exe/linux + + - name: Download macOS build + uses: actions/download-artifact@v2 + with: + name: macOS Build + path: exe/mac + + - name: Download Windows build + uses: actions/download-artifact@v2 + with: + name: Windows Build + path: exe/windows + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-west-2 + aws-region: us-west-1 - name: Upload binaries to S3 uses: jakejarvis/s3-sync-action@master -- cgit v1.2.3-70-g09d2 From a1fada4e7f0be2d5aa661aee483a59ba93bacb40 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 18:49:13 -0700 Subject: ci: :green_heart: install Xvfb to run headless electron on Linux --- .github/workflows/main.yaml | 20 ++++++++++++++++++++ extension/src/test-runner/runTestOnVSCodeHost.ts | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4f1e538c..8249b576 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,6 +14,8 @@ jobs: runs-on: ${{ matrix.os }} steps: + # Install Python requirements and build+upload binaries for each platform + - name: Check-out repository uses: actions/checkout@v3 @@ -55,6 +57,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 + # Download corresponding binary artifact for the platform + - name: Create exe directory run: | mkdir extension/server/exe @@ -80,6 +84,8 @@ jobs: path: extension/server/exe/windows if: matrix.os == 'windows-latest' + # Setup Node.js and install dependencies + - name: Use Node.js 19.0.0 uses: actions/setup-node@v3 with: @@ -107,16 +113,26 @@ jobs: cd extension/react-app npm ci --legacy-peer-deps + # Run tests + - name: Package the extension run: | cd extension npm run package + - name: Install Xvfb for Linux + run: | + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment + if: matrix.os == 'ubuntu-20.04' + - name: Run extension tests run: | cd extension npm run test + # Package again and build+upload the .vsix - name: Remove exe directory and re-package run: | cd extension @@ -137,6 +153,8 @@ jobs: contents: write steps: + # Checkout and download .vsix artifact + - name: Checkout uses: actions/checkout@v2 @@ -146,6 +164,8 @@ jobs: name: vsix-artifact path: extension/build + # Publish the extension and commit/push the version change + - name: Publish run: | cd extension diff --git a/extension/src/test-runner/runTestOnVSCodeHost.ts b/extension/src/test-runner/runTestOnVSCodeHost.ts index 2a542ffc..21267c2d 100644 --- a/extension/src/test-runner/runTestOnVSCodeHost.ts +++ b/extension/src/test-runner/runTestOnVSCodeHost.ts @@ -11,7 +11,10 @@ async function main() { // The path to test runner // Passed to --extensionTestsPath - const extensionTestsPath = path.resolve(extensionDevelopmentPath, "out/test-runner/mochaRunner"); + const extensionTestsPath = path.resolve( + extensionDevelopmentPath, + "out/test-runner/mochaRunner" + ); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath }); -- cgit v1.2.3-70-g09d2 From c3d62c5ae203aaca32583f75a7e80dfd9f196e11 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 19:05:09 -0700 Subject: fix: :bug: set export display in same step as linux npm test --- .github/workflows/main.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8249b576..269e20be 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -120,17 +120,20 @@ jobs: cd extension npm run package - - name: Install Xvfb for Linux + - name: Install Xvfb for Linux and run tests run: | sudo apt-get install -y xvfb # Install Xvfb Xvfb :99 & # Start Xvfb export DISPLAY=:99 # Export the display number to the environment + cd extension + npm run test if: matrix.os == 'ubuntu-20.04' - name: Run extension tests run: | cd extension npm run test + if: matrix.os != 'ubuntu-20.04' # Package again and build+upload the .vsix - name: Remove exe directory and re-package -- cgit v1.2.3-70-g09d2 From 8d198663e116c7c77b7e59015bc6032736f71f6e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 21:06:09 -0700 Subject: fix: :bug: use windows equivalent of rm -rf --- .github/workflows/main.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 269e20be..27b802e7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -136,10 +136,18 @@ jobs: if: matrix.os != 'ubuntu-20.04' # Package again and build+upload the .vsix - - name: Remove exe directory and re-package + + - name: Remove exe directory (Windows) + run: rmdir /s /q extension/server/exe + if: matrix.os == 'windows-latest' + + - name: Remove exe directory (Mac/Linux) + run: rm -rf extension/server/exe + if: matrix.os != 'windows-latest' + + - name: Re-package the extension run: | cd extension - rm -rf server/exe npm run package - name: Upload .vsix as an artifact -- cgit v1.2.3-70-g09d2 From 64552dc881509c46aa14253ff94aee9d86ade256 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 21:25:55 -0700 Subject: fix: :bug: use powershell remove-item --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 27b802e7..55b3e88f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -138,7 +138,7 @@ jobs: # Package again and build+upload the .vsix - name: Remove exe directory (Windows) - run: rmdir /s /q extension/server/exe + run: Remove-Item -Path "extension/server/exe" -Recurse -Force if: matrix.os == 'windows-latest' - name: Remove exe directory (Mac/Linux) -- cgit v1.2.3-70-g09d2 From 286fb0e20e48859f129ccf568d03248805bcbc61 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 21:37:50 -0700 Subject: fix: :bug: kill server before trying to delete exe on windows --- .github/workflows/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 55b3e88f..ef00302e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -138,7 +138,9 @@ jobs: # Package again and build+upload the .vsix - name: Remove exe directory (Windows) - run: Remove-Item -Path "extension/server/exe" -Recurse -Force + run: | + FOR /F "tokens=5" %a IN ('netstat -ano ^| findstr "65432"') DO taskkill /PID %a /F + Remove-Item -Path "extension/server/exe" -Recurse -Force if: matrix.os == 'windows-latest' - name: Remove exe directory (Mac/Linux) -- cgit v1.2.3-70-g09d2 From e8ebff1e6b07dfaafff81ee7013bb019cbfe2075 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 22:00:01 -0700 Subject: fix: :bug: add server/exe to .vscodeignore insteading of manually removing --- .github/workflows/main.yaml | 17 +---------------- extension/.vscodeignore | 4 +++- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ef00302e..6111856d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -135,22 +135,7 @@ jobs: npm run test if: matrix.os != 'ubuntu-20.04' - # Package again and build+upload the .vsix - - - name: Remove exe directory (Windows) - run: | - FOR /F "tokens=5" %a IN ('netstat -ano ^| findstr "65432"') DO taskkill /PID %a /F - Remove-Item -Path "extension/server/exe" -Recurse -Force - if: matrix.os == 'windows-latest' - - - name: Remove exe directory (Mac/Linux) - run: rm -rf extension/server/exe - if: matrix.os != 'windows-latest' - - - name: Re-package the extension - run: | - cd extension - npm run package + # Upload .vsix artifact - name: Upload .vsix as an artifact uses: actions/upload-artifact@v2 diff --git a/extension/.vscodeignore b/extension/.vscodeignore index d3326fdc..51d66585 100644 --- a/extension/.vscodeignore +++ b/extension/.vscodeignore @@ -24,4 +24,6 @@ react-app/src scripts/data scripts/env -scripts/.continue_env_installed \ No newline at end of file +scripts/.continue_env_installed + +server/exe/** \ No newline at end of file -- cgit v1.2.3-70-g09d2 From cbd7656bb4c9aebfe98c746111af52cf7192aa1b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 22:22:46 -0700 Subject: feat: :sparkles: testing in ci, final test of --- .github/workflows/main.yaml | 49 ++++++++++-------------- continuedev/src/continuedev/libs/llm/together.py | 6 ++- 2 files changed, 25 insertions(+), 30 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6111856d..9bc05281 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -45,7 +45,7 @@ jobs: name: ${{ runner.os }} Build path: dist/* - test-and-package: + test-and-publish-extension: needs: pyinstaller strategy: matrix: @@ -135,51 +135,42 @@ jobs: npm run test if: matrix.os != 'ubuntu-20.04' - # Upload .vsix artifact - - - name: Upload .vsix as an artifact - uses: actions/upload-artifact@v2 - with: - name: vsix-artifact - path: extension/build/* - if: matrix.os == 'ubuntu-20.04' - - publish: - needs: test-and-package - runs-on: ubuntu-20.04 - permissions: - contents: write - - steps: - # Checkout and download .vsix artifact - - - name: Checkout - uses: actions/checkout@v2 - - - name: Download .vsix artifact - uses: actions/download-artifact@v2 - with: - name: vsix-artifact - path: extension/build - - # Publish the extension and commit/push the version change + # Publish the extension and commit/push the version change (ONLY on ubuntu-20.04) - name: Publish run: | cd extension npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + if: matrix.os == 'ubuntu-20.04' + - name: Commit changes run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "ci: 💚 Update package.json version [skip ci]" + if: matrix.os == 'ubuntu-20.04' - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} + if: matrix.os == 'ubuntu-20.04' + + - name: Upload .vsix as an artifact + uses: actions/upload-artifact@v2 + with: + name: vsix-artifact + path: extension/build/* + if: matrix.os == 'ubuntu-20.04' + publish-binaries: + needs: test-and-publish-extension + runs-on: ubuntu-20.04 + permissions: + contents: write + + steps: # Download binaries and upload to S3 - name: Download Linux build diff --git a/continuedev/src/continuedev/libs/llm/together.py b/continuedev/src/continuedev/libs/llm/together.py index 1cc0a711..c3f171c9 100644 --- a/continuedev/src/continuedev/libs/llm/together.py +++ b/continuedev/src/continuedev/libs/llm/together.py @@ -49,6 +49,8 @@ class TogetherLLM(LLM): prompt += f": Hi!\n: {system_message}\n" for message in chat_messages: prompt += f'<{"human" if message["role"] == "user" else "bot"}>: {message["content"]}\n' + + prompt += ":" return prompt async def stream_complete(self, prompt, with_history: List[ChatMessage] = None, **kwargs) -> Generator[Union[Any, List, Dict], None, None]: @@ -113,6 +115,8 @@ class TogetherLLM(LLM): "Authorization": f"Bearer {self.api_key}" }) as resp: try: - return await resp.text() + text = await resp.text() + j = json.loads(text) + return j["output"]["choices"][0]["text"] except: raise Exception(await resp.text()) -- cgit v1.2.3-70-g09d2 From a131c17326591e67a68faf6f96371ad8fc332b71 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 9 Aug 2023 22:58:07 -0700 Subject: fix: :green_heart: publishing to depend on ALL tests --- .github/workflows/main.yaml | 66 ++++++++++++++++++++++++++++++--------------- extension/package.json | 2 +- 2 files changed, 46 insertions(+), 22 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9bc05281..99b30201 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -45,7 +45,7 @@ jobs: name: ${{ runner.os }} Build path: dist/* - test-and-publish-extension: + test-and-package: needs: pyinstaller strategy: matrix: @@ -135,42 +135,66 @@ jobs: npm run test if: matrix.os != 'ubuntu-20.04' - # Publish the extension and commit/push the version change (ONLY on ubuntu-20.04) + # Upload .vsix artifact + + - name: Upload .vsix as an artifact + uses: actions/upload-artifact@v2 + with: + name: vsix-artifact + path: extension/build/* + if: matrix.os == 'ubuntu-20.04' + + publish: + needs: test-and-package + runs-on: ubuntu-20.04 + permissions: + contents: write + + steps: + # Checkout and download .vsix artifact + + - name: Checkout + uses: actions/checkout@v2 + + - name: Download .vsix artifact + uses: actions/download-artifact@v2 + with: + name: vsix-artifact + path: extension/build + + # Publish the extension and commit/push the version change + + - name: Use Node.js 19.0.0 + uses: actions/setup-node@v3 + with: + node-version: 19.0.0 + + - name: Cache extension node_modules + uses: actions/cache@v2 + with: + path: extension/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }} + + - name: Install extension Dependencies + run: | + cd extension + npm ci - name: Publish run: | cd extension npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - if: matrix.os == 'ubuntu-20.04' - - name: Commit changes run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "ci: 💚 Update package.json version [skip ci]" - if: matrix.os == 'ubuntu-20.04' - - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} - if: matrix.os == 'ubuntu-20.04' - - name: Upload .vsix as an artifact - uses: actions/upload-artifact@v2 - with: - name: vsix-artifact - path: extension/build/* - if: matrix.os == 'ubuntu-20.04' - - publish-binaries: - needs: test-and-publish-extension - runs-on: ubuntu-20.04 - permissions: - contents: write - - steps: # Download binaries and upload to S3 - name: Download Linux build diff --git a/extension/package.json b/extension/package.json index 7cf2bc7d..5db72fd5 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "The open-source coding autopilot", - "version": "0.0.289", + "version": "0.0.290", "publisher": "Continue", "engines": { "vscode": "^1.67.0" -- cgit v1.2.3-70-g09d2 From 19acf3bb36c1e44274297c806b89b589ca02f5ba Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 10 Aug 2023 10:47:09 -0700 Subject: fix: :green_heart: testing for failure to package dist in vsix --- .github/workflows/main.yaml | 108 ++++++++++++---------- continuedev/src/continuedev/plugins/steps/help.py | 3 +- extension/react-app/src/components/ComboBox.tsx | 3 +- extension/scripts/package.js | 6 ++ 4 files changed, 68 insertions(+), 52 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 99b30201..03855b64 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -180,55 +180,63 @@ jobs: cd extension npm ci - - name: Publish - run: | - cd extension - npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - - name: Commit changes - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git commit -am "ci: 💚 Update package.json version [skip ci]" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} - - # Download binaries and upload to S3 - - - name: Download Linux build - uses: actions/download-artifact@v2 - with: - name: Linux Build - path: exe/linux - - - name: Download macOS build - uses: actions/download-artifact@v2 - with: - name: macOS Build - path: exe/mac - - - name: Download Windows build - uses: actions/download-artifact@v2 - with: - name: Windows Build - path: exe/windows - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + - name: Upload .vsix a second time + uses: actions/upload-artifact@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-west-1 + name: vsix-artifact + path: extension/build - - name: Upload binaries to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete - env: - AWS_S3_BUCKET: continue-server-binaries - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: "us-west-1" - SOURCE_DIR: "exe" + # - name: Publish + # run: | + # cd extension + # npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "ci: 💚 Update package.json version [skip ci]" + + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} + + # # Download binaries and upload to S3 + + # - name: Download Linux build + # uses: actions/download-artifact@v2 + # with: + # name: Linux Build + # path: exe/linux + + # - name: Download macOS build + # uses: actions/download-artifact@v2 + # with: + # name: macOS Build + # path: exe/mac + + # - name: Download Windows build + # uses: actions/download-artifact@v2 + # with: + # name: Windows Build + # path: exe/windows + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v1 + # with: + # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # aws-region: us-west-1 + + # - name: Upload binaries to S3 + # uses: jakejarvis/s3-sync-action@master + # with: + # args: --acl public-read --follow-symlinks --delete + # env: + # AWS_S3_BUCKET: continue-server-binaries + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # AWS_REGION: "us-west-1" + # SOURCE_DIR: "exe" diff --git a/continuedev/src/continuedev/plugins/steps/help.py b/continuedev/src/continuedev/plugins/steps/help.py index ec670999..82f885d6 100644 --- a/continuedev/src/continuedev/plugins/steps/help.py +++ b/continuedev/src/continuedev/plugins/steps/help.py @@ -39,6 +39,7 @@ class HelpStep(Step): if question.strip() == "": self.description = help else: + self.description = "The following output is generated by a language model, which may hallucinate. Type just '/help'to see a fixed answer. You can also learn more by reading [the docs](https://continue.dev/docs).\n\n" prompt = dedent(f""" Information: @@ -48,7 +49,7 @@ class HelpStep(Step): Please us the information below to provide a succinct answer to the following question: {question} - Do not cite any slash commands other than those you've been told about, which are: /edit and /feedback.""") + Do not cite any slash commands other than those you've been told about, which are: /edit and /feedback. Never refer or link to any URL.""") self.chat_context.append(ChatMessage( role="user", diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 472e1b14..bf32fc5a 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -479,7 +479,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { selected={downshiftProps.selectedItem === item} > - {item.name}:{" "} + {item.name} + {" "} {item.description} diff --git a/extension/scripts/package.js b/extension/scripts/package.js index ae9a4d94..e36df029 100644 --- a/extension/scripts/package.js +++ b/extension/scripts/package.js @@ -17,6 +17,12 @@ exec("npm install", (error) => { exec("npm run build", (error) => { if (error) throw error; + if (!fs.existsSync(path.join("dist", "assets", "index.js"))) { + throw new Error("react-app build did not produce index.js"); + } + if (!fs.existsSync(path.join("dist", "assets", "index.css"))) { + throw new Error("react-app build did not produce index.css"); + } console.log("npm run build in react-app completed"); process.chdir(".."); -- cgit v1.2.3-70-g09d2 From 758520fe6b59d3330dec80ac07d05282d36e0058 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 10 Aug 2023 11:02:51 -0700 Subject: fix: :green_heart: one last test --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 03855b64..242d5a4e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -183,7 +183,7 @@ jobs: - name: Upload .vsix a second time uses: actions/upload-artifact@v2 with: - name: vsix-artifact + name: vsix-artifact-2 path: extension/build # - name: Publish -- cgit v1.2.3-70-g09d2 From 2ce18bd7eef0347dd34d8bbc45425a60201ba158 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 10 Aug 2023 11:14:54 -0700 Subject: test: :white_check_mark: do full ci run --- .github/workflows/main.yaml | 110 +++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 58 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 242d5a4e..75802879 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -180,63 +180,57 @@ jobs: cd extension npm ci - - name: Upload .vsix a second time - uses: actions/upload-artifact@v2 + - name: Publish + run: | + cd extension + npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "ci: 💚 Update package.json version [skip ci]" + + - name: Push changes + uses: ad-m/github-push-action@master with: - name: vsix-artifact-2 - path: extension/build + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} + + # Download binaries and upload to S3 + + - name: Download Linux build + uses: actions/download-artifact@v2 + with: + name: Linux Build + path: exe/linux - # - name: Publish - # run: | - # cd extension - # npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "ci: 💚 Update package.json version [skip ci]" - - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} - - # # Download binaries and upload to S3 - - # - name: Download Linux build - # uses: actions/download-artifact@v2 - # with: - # name: Linux Build - # path: exe/linux - - # - name: Download macOS build - # uses: actions/download-artifact@v2 - # with: - # name: macOS Build - # path: exe/mac - - # - name: Download Windows build - # uses: actions/download-artifact@v2 - # with: - # name: Windows Build - # path: exe/windows - - # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v1 - # with: - # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # aws-region: us-west-1 - - # - name: Upload binaries to S3 - # uses: jakejarvis/s3-sync-action@master - # with: - # args: --acl public-read --follow-symlinks --delete - # env: - # AWS_S3_BUCKET: continue-server-binaries - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: "us-west-1" - # SOURCE_DIR: "exe" + - name: Download macOS build + uses: actions/download-artifact@v2 + with: + name: macOS Build + path: exe/mac + + - name: Download Windows build + uses: actions/download-artifact@v2 + with: + name: Windows Build + path: exe/windows + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-1 + + - name: Upload binaries to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: continue-server-binaries + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: "us-west-1" + SOURCE_DIR: "exe" -- cgit v1.2.3-70-g09d2 From 512ccfda670abb6132e9cd720280a472e53e3326 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 10 Aug 2023 12:47:37 -0700 Subject: fix: :ambulance: specify packagePath for vsix --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 75802879..ddfe9288 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -183,7 +183,7 @@ jobs: - name: Publish run: | cd extension - npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} + npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} --packagePath ./build/*.vsix - name: Commit changes run: | -- cgit v1.2.3-70-g09d2 From d8327ec6f82058479bd294bfcdccaf3c2b54de0a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 10 Aug 2023 23:25:12 -0700 Subject: fix: :green_heart: remove "patch" from vsce publish command --- .github/workflows/main.yaml | 2 +- extension/package-lock.json | 1 + extension/package.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ddfe9288..a114c7c9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -183,7 +183,7 @@ jobs: - name: Publish run: | cd extension - npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} --packagePath ./build/*.vsix + npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath ./build/*.vsix - name: Commit changes run: | diff --git a/extension/package-lock.json b/extension/package-lock.json index b64513ec..97451b1a 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,5 +1,6 @@ { "name": "continue", + "version": "0.0.297", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/extension/package.json b/extension/package.json index 2e128e99..07af8a59 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,6 +1,7 @@ { "name": "continue", "icon": "media/terminal-continue.png", + "version": "0.0.297", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" -- cgit v1.2.3-70-g09d2 From 1936f725d226bea2e13d5d88c1dd7a9a02ddd259 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 11 Aug 2023 13:34:14 -0700 Subject: fix: :bug: version patch in the publish step --- .github/workflows/main.yaml | 5 +++++ extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a114c7c9..a3927f3f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -185,6 +185,11 @@ jobs: cd extension npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath ./build/*.vsix + - name: Update version in package.json + run: | + cd extension + npm version patch + - name: Commit changes run: | git config --local user.email "action@github.com" diff --git a/extension/package-lock.json b/extension/package-lock.json index 97451b1a..be8873b3 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.297", + "version": "0.0.298", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.296", + "version": "0.0.298", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index 07af8a59..dfc281c3 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/terminal-continue.png", - "version": "0.0.297", + "version": "0.0.298", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" -- cgit v1.2.3-70-g09d2 From 34f77a7344bc527e0c08dea5820a01748f2f8481 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 11 Aug 2023 13:43:47 -0700 Subject: ci: :green_heart: run ci only on main --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a3927f3f..94f7073b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,7 +3,7 @@ name: Publish Extension on: push: branches: - - ci-testing + - main jobs: pyinstaller: -- cgit v1.2.3-70-g09d2