ci_script.ps1 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (c) Jupyter Development Team.
  2. # Distributed under the terms of the Modified BSD License.
  3. $ErrorActionPreference = 'stop'
  4. python -c "from jupyterlab.commands import build_check; build_check()"
  5. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  6. if ($Env:GROUP -eq "python") {
  7. jupyter lab build --debug
  8. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  9. # Run the python tests
  10. python -m pytest
  11. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  12. }
  13. if ($Env:GROUP -eq "integrity") {
  14. # Run the integrity script first
  15. jlpm run integrity --force
  16. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  17. # Check yarn.lock file
  18. jlpm check --integrity
  19. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  20. # Run a browser check in dev mode
  21. jlpm run build
  22. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  23. python -m jupyterlab.browser_check --dev-mode
  24. if ($LASTEXITCODE -ne 0) { throw "Command failed. See above errors for details" }
  25. }
  26. if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }