v3.22.1 — The CI heap failures were a test mock escaping its own suite #969
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| # #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 compiled output, so this runs after compile. | |
| - 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 |