Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: branch preview #5325

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
38 changes: 38 additions & 0 deletions .github/workflows/vscode-extension-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "VSCode Extension - CI"

on:
push:
branches:
- task/extension/branch-preview

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
thewahome marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Install dependencies
run: npm i -g typescript @vscode/vsce

- name: Run PowerShell script
run: |
pwsh -File ./scripts/execute-vscode-sideload.ps1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to sideload into the GitHub actions runner, I'm not sure how it helps us?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am following the instructions inside the debugging.md file.
I want to see whether sideloading would sideload into a codespaces for the branch.
I haven't set up the codespaces here yet. I am currently making sure that the prerequisites are in the worflow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think to achieve that you'd need to run the sideloading script inside of the container definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes... Learning that too right now...


# - name: Create Codespace
# uses: codespaces/create-codespace@v1
# with:
# repository: ${{ github.repository }}
# ref: ${{ github.head_ref }}
# devcontainer_path: .devcontainer/devcontainer.json
5 changes: 5 additions & 0 deletions vscode/microsoft-kiota/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "VSCode Extension Dev Container",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:0-14",
"postCreateCommand": "cd vscode/microsoft-kiota && npm install && npx @vscode/vsce package && code --install-extension ./kiota-$(jq -r .version package.json).vsix"
}
Loading