diff options
| author | Martin Fischer <martin@push-f.com> | 2022-01-20 09:11:37 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2022-01-23 08:00:39 +0100 |
| commit | 6d701d2fea07198807351c7c4856001c0f1ebffb (patch) | |
| tree | 9304d54d6ee9c9e7e28f11fd32a39e91ee6e8126 | |
| parent | 96450b17d4304a740c0af934cbb841de67178d94 (diff) | |
[fix] ensure that test.pyright installs pyright
nodejs.ensure only sets up NVM if there isn't a system-wide
installation of Node that matches our NODE_MINIMUM_VERSION.
The ubuntu image in the CI comes with an up to date node version,
so pyright from .nvm_packages is never installed.
This commit fixes this by introducing a package.json file.
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | .nvm_packages | 1 | ||||
| -rwxr-xr-x | manage | 3 | ||||
| -rw-r--r-- | package.json | 5 |
4 files changed, 10 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index bacf9d7a9..9b3eff158 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ dist/ local/ gh-pages/ *.egg-info/ + +/package-lock.json +/node_modules/ diff --git a/.nvm_packages b/.nvm_packages index fe8585c3b..13eabc5c2 100644 --- a/.nvm_packages +++ b/.nvm_packages @@ -5,5 +5,4 @@ # [1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing eslint -pyright @@ -687,9 +687,10 @@ test.pylint() { test.pyright() { build_msg TEST "[pyright] static type check of python sources" nodejs.ensure + npm install # We run Pyright in the virtual environment because Pyright # executes "python" to determine the Python version. - pyenv.cmd pyright -p pyrightconfig-ci.json + pyenv.cmd npx --no-install pyright -p pyrightconfig-ci.json dump_return $? } diff --git a/package.json b/package.json new file mode 100644 index 000000000..187d17a4b --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "pyright": "^1.1.212" + } +} |