Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d701d2f authored by Martin Fischer's avatar Martin Fischer
Browse files

[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.
parent 96450b17
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,3 +16,6 @@ dist/
local/
gh-pages/
*.egg-info/

/package-lock.json
/node_modules/
+0 −1
Original line number Diff line number Diff line
@@ -5,5 +5,4 @@
# [1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing

eslint
pyright
+2 −1
Original line number Diff line number Diff line
@@ -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 $?
}

package.json

0 → 100644
+5 −0
Original line number Diff line number Diff line
{
  "dependencies": {
    "pyright": "^1.1.212"
  }
}