diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 3de690bce98..1c5e093d036 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -97,6 +97,9 @@ jobs: - name: Coveralls run: coveralls continue-on-error: true + - name: PyRight + run: npm run pyright + continue-on-error: true test_percy: name: Percy CI diff --git a/docker-compose.yml b/docker-compose.yml index 57c05746f2b..2a18ce1bbad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: volumes: - .:/app:delegated - node_modules:/app/node_modules/:delegated + - dockerpythonvenv:/app/dockerpythonvenv/:delegated depends_on: - backend diff --git a/package-lock.json b/package-lock.json index 13a870730b0..f6ba4b51b94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8213,6 +8213,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pyright": { + "version": "1.1.256", + "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.256.tgz", + "integrity": "sha512-5IVvr8BHFTORT+rvGBQVdXWwQRQdx30aM+cw6wY37tan7cXnkgcfufhKOCPQ8P+88QO8cdgK6gwTYfM4u6umdg==", + "dev": true + }, "qs": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", diff --git a/package.json b/package.json index 5b115d44f0e..db3fa12edce 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "playwright:ci": "run-p --race server playwright:integration", "playwright:integration": "wait-on -i 3000 http://localhost:8000/cms && playwright test ./tests/integration.spec.js", "precommit": "npm run test", + "pyright": "pyright", "server": "python network-api/manage.py runserver 0.0.0.0:8000", "server:silent": "python network-api/manage.py runserver 0.0.0.0:8000 >> server.log 2>&1", "start": "docker-compose up", @@ -114,6 +115,7 @@ "eslint-plugin-react": "^7.25.1", "optipng-bin": "^7.0.0", "prettier": "^2.3.2", + "pyright": "^1.1.256", "stylelint": "^13.13.1", "stylelint-config-standard": "^20.0.0", "stylelint-prettier": "^1.2.0", diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 00000000000..f038e54d0a4 --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,16 @@ +{ + "include": [ + "network-api/networkapi" + ], + "exclude": [ + "**/node_modules", + "**/__pycache__", + "**/migrations" + ], + "extraPaths": [ + "./dockerpythonvenv/lib/python3.9/site-packages/" + ], + "venvPath": "dockerpythonvenv", + "pythonVersion": "3.9", + "pythonPlatform": "Linux" +}