diff --git a/.continue/prompts/core-unit-test.prompt b/.continue/prompts/core-unit-test.prompt index 70f45bd78..abf04b1b6 100644 --- a/.continue/prompts/core-unit-test.prompt +++ b/.continue/prompts/core-unit-test.prompt @@ -15,7 +15,7 @@ Use double quotes (or backticks if needed) for strings The code being tested is used in IDE extensions, and it: - accesses code workspaces through the IDE ("workspace directories") - persists extension-related data to the the local machine of the user ("global directory"), and -- uses configuration via a `ConfigHandler`, which is stored in either the global directory (default) or accessed via a remote "control plane" using the `ControlPlaneClient` +- uses configuration via a `ConfigHandler`, which is stored in the global directory Jest testing setup includes - @core/test/jest.global-setup.ts initializes a temporary global directory, which is where files that store persisted extension data live. @@ -25,7 +25,6 @@ Jest testing setup includes @core/test/fixtures.ts provides fixtures that should be used in tests to emulate extension behavior - import `testIde` for IDE/workspace operations - import `testConfigHandler` for any ConfigHandler needs -- import `testControlPlaneClient` for control plane operations - import `ideSettingsPromise` for any IdeSettings needs - import `testLLM` for any ILLM/BaseLLM needs. Set the `completion` property to the desired completion, e.g. `testLLM.completion = "Desired completion";` diff --git a/.github/workflows/docs-gh-pages.yml b/.github/workflows/docs-gh-pages.yml new file mode 100644 index 000000000..7a01eaefa --- /dev/null +++ b/.github/workflows/docs-gh-pages.yml @@ -0,0 +1,55 @@ +name: Deploy Docs to GitHub Pages + +on: + push: + branches: [main] + paths: + - "docs/**" + - "docs-site/**" + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: docs-site/package-lock.json + + - name: Install dependencies + working-directory: docs-site + run: npm ci + + - name: Build + working-directory: docs-site + run: npm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs-site/out + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 67c98fa21..dc1eb0079 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -125,10 +125,22 @@ jobs: needs: - build if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true' + permissions: + contents: write + pull-requests: write steps: + # 0. Setup git - name: Checkout uses: actions/checkout@v6 + - name: Set up Git + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + + - name: Pull latest changes from release + run: git fetch origin ${{ github.ref }} && git checkout ${{ github.ref }} + # 1. Download the artifacts - uses: actions/download-artifact@v8 with: @@ -151,3 +163,52 @@ jobs: cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix + # 4. Create PR with version bump + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: ".nvmrc" + + - name: Create PR branch + run: | + BRANCH_NAME="chore/bump-vscode-version-$(date +%Y%m%d-%H%M%S)" + git checkout -b $BRANCH_NAME + echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV + + - name: Bump version in package.json + run: | + cd extensions/vscode + npm version patch --no-git-tag-version + VERSION=$(node -p "require('./package.json').version") + echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v8 + with: + token: ${{ secrets.CI_GITHUB_TOKEN }} + commit-message: "chore: bump vscode extension version to ${{ env.NEW_VERSION }}" + title: "chore: bump vscode extension version to ${{ env.NEW_VERSION }}" + body: | + Automated PR to bump the VS Code extension version after successful pre-release publication. + + - Bumped version in extensions/vscode/package.json to ${{ env.NEW_VERSION }} + branch: ${{ env.BRANCH_NAME }} + base: main + delete-branch: true + + # 5. Update version in package.json + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 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 }} diff --git a/.gitignore b/.gitignore index eeafe223e..60305a04b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ downloads/ eggs/ .eggs/ lib/ +!docs-site/lib/ lib64/ parts/ sdist/ diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 324ac997a..f374d4113 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,7 @@