Skip to content

Commit

Permalink
meta(vscode): Add pipeline to test and build private feature vsix (#6427
Browse files Browse the repository at this point in the history
)

* Add pipeline

* Update ai key to repository variable
  • Loading branch information
ccastrotrejo authored Jan 21, 2025
1 parent f76deba commit 1e6c80f
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 1 deletion.
86 changes: 86 additions & 0 deletions .github/workflows/private-vsix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Private vsix build
run-name: Private vsix build - [ ${{ github.ref_name || 'branch' }} ]
on:
workflow_dispatch: # Trigger only manually workflow_dispatch: # Trigger only manually

env:
AI_KEY: ${{ vars.AI_KEY }}

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Set up Node.js version ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- run: pnpm turbo run test:lib --cache-dir=.turbo
- run: pnpm turbo run test:extension-unit --cache-dir=.turbo

build:
name: Build private vsix
runs-on: ubuntu-latest

steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Set up Node.js version 20
uses: actions/setup-node@v1
with:
node-version: 20

- uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: 'Set Designer Extension VSIX aiKey in package.json'
run: echo "`jq '.aiKey="${{ env.AI_KEY }}"' apps/vs-code-designer/src/package.json`" > apps/vs-code-designer/src/package.json

- name: Replace Placeholder with Telemetry Key
run: sed -i 's/setInGitHubBuild/${{ env.AI_KEY }}/g' apps/vs-code-designer/src/main.ts

- name: 'Pack VSCode Designer Extension'
run: pnpm run vscode:designer:pack

- name: Archive VSIX
uses: actions/upload-artifact@v4
with:
path: |
apps/vs-code-designer/dist/*.vsix
2 changes: 1 addition & 1 deletion .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- cron: '0 17 * * 4'

env:
AI_KEY: 3cf0d6ae-3327-414a-b7c1-12f31ef45eff
AI_KEY: ${{ vars.AI_KEY }}
NX_AI_CON_STR: InstrumentationKey=3cf0d6ae-3327-414a-b7c1-12f31ef45eff;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/
BUMP_COMMAND: pnpm run bump --release-as ${{ github.event.inputs.release_type || 'minor' }}

Expand Down

0 comments on commit 1e6c80f

Please sign in to comment.