Skip to content

Merge remote-tracking branch 'origin/main' into claude/next-task-53-6… #976

Merge remote-tracking branch 'origin/main' into claude/next-task-53-6…

Merge remote-tracking branch 'origin/main' into claude/next-task-53-6… #976

Workflow file for this run

name: Run JESTS on PUSH
on:
push:
pull_request:
# The job only reads the repository; it publishes nothing and opens no pull requests.
permissions:
contents: read
jobs:
Compile-and-Test-Salesforce-Data-Treecipe:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout Current Repository
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
# "npm ci" installs exactly what package-lock.json records, so a hijacked patch release
# inside an existing version range cannot be pulled into CI. "--ignore-scripts" additionally
# stops any dependency's install hook from executing on the runner; no dependency in this
# project builds a native addon, so nothing needs those hooks to run.
- name: Install dependencies
run: npm ci --ignore-scripts
# ts-jest only typechecks files reachable from a test, and nothing imports src/extension.ts,
# so without this step a type error in the extension entry point reaches the publish job.
# Since #137 this is "tsc --noEmit": esbuild emits, tsc only checks.
- name: Typecheck TypeScript
run: npm run compile
# "vsce ls" reads what is on disk and does not run "vscode:prepublish", so the bundle has to
# exist before the packaged-contents check below or it would assert against an empty out/.
- name: Bundle extension
run: npm run bundle
# #67 asked for a guard so what enters the .vsix cannot silently regress, and nothing was
# added; #121 is what that cost -- ts-node sat in "dependencies" and shipped 1.6 MB of itself
# plus its typescript peer to every Marketplace user. vsce is pinned here for the same reason
# the publish job pins it. "vsce ls" reads the bundled output, so this runs after the bundle.
- name: Install vsce
run: npm install -g --ignore-scripts @vscode/vsce@3.9.2
# Written to the runner temp directory rather than the workspace: a listing file left in the
# working directory is itself an unexpected top-level path, and vsce packages the working
# directory rather than the git index.
- name: List packaged contents
run: vsce ls > "$RUNNER_TEMP/vsce-ls.txt"
- name: Check packaged contents
run: node .github/workflowScripts/checkPackagedPaths.js "$RUNNER_TEMP/vsce-ls.txt"
- name: Lint
run: npm run lint
- name: Run Jest tests
run: xvfb-run -a npm run jest-test-summary
- name: Check Jest Coverage and Results Summary
shell: pwsh
run: . .github/workflowScripts/checkJestTestCoverage.ps1