Title: ci: run unit tests on pull requests and pushes to main by edusperoni · Pull Request #6087 · NativeScript/nativescript-cli · GitHub
Open Graph Title: ci: run unit tests on pull requests and pushes to main by edusperoni · Pull Request #6087 · NativeScript/nativescript-cli
X Title: ci: run unit tests on pull requests and pushes to main by edusperoni · Pull Request #6087 · NativeScript/nativescript-cli
Description: PR Checklist The PR title follows our guidelines. There is an issue for the bug/feature this PR is for. (no tracking issue — happy to open one) You have signed the CLA. All existing tests are passing. Tests for the changes are included. (this PR is the test infrastructure itself) What is the current behavior? Nothing runs the unit tests in CI. The existing workflows cover releases, CodeQL, Scorecard and dependency review, but never npm test. The suite runs in exactly one place: prepack → grunt prepare → shell:npm_test, which only fires during npm pack. So a broken test first surfaces while cutting a release rather than on the PR that broke it. What is the new behavior? Adds .github/workflows/tests.yml, running npm ci --ignore-scripts && npm test on pull requests and pushes to main. Matrixed over Node 20.x and 22.x, matching engines and the version the release workflow publishes with concurrency group so superseded runs are cancelled Action SHAs pinned to the ones already in use in this repo, plus the harden-runner step, to stay consistent with the existing workflows npm ci resolves cleanly without --legacy-peer-deps (verified), so unlike the release workflow this one gets a reproducible install from the lockfile Worth noting separately: engines currently allows >=20.0.0, but Node 20 reached end of life in April 2026. Adding 24.x to the matrix and raising the floor is probably worth a follow-up. Summary by CodeRabbit Tests Added an automated “Tests” workflow for pull requests and for pushes to the main branch. Tests now run across supported Node.js versions for broader compatibility coverage. Enabled dependency caching and improved test execution security and concurrency behavior.
Open Graph Description: PR Checklist The PR title follows our guidelines. There is an issue for the bug/feature this PR is for. (no tracking issue — happy to open one) You have signed the CLA. All existing tests are ...
X Description: PR Checklist The PR title follows our guidelines. There is an issue for the bug/feature this PR is for. (no tracking issue — happy to open one) You have signed the CLA. All existing tests are ...
Opengraph URL: https://github.com/NativeScript/nativescript-cli/pull/6087
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a832efc3-db6f-b595-bc91-051d139574a6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C242:2E9831:B8044C:F3A28B:6B01C1A6 |
| html-safe-nonce | f629ca522d6a57c6cc7c9163b9074c1a5a9cbe91de7b1ed8dce2b91271268968 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjQyOjJFOTgzMTpCODA0NEM6RjNBMjhCOjZCMDFDMUE2IiwidmlzaXRvcl9pZCI6IjM2OTE2OTgwNDI1MzAwMjE3OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 93383d77879491338b93bd3166cadc990e0a9b7a02cc1e58f31d7811284849b9 |
| hovercard-subject-tag | pull_request:4132961784 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/nativescript-cli/pull/6087/files |
| twitter:image | https://avatars.githubusercontent.com/u/4061767?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4061767?s=400&v=4 |
| og:image:alt | PR Checklist The PR title follows our guidelines. There is an issue for the bug/feature this PR is for. (no tracking issue — happy to open one) You have signed the CLA. All existing tests are ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 21347346 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21347346 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width