tests.yml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. name: Test
  2. on: [push, pull_request]
  3. jobs:
  4. linuxjs:
  5. name: JS
  6. strategy:
  7. matrix:
  8. group: [js-application, js-apputils, js-cells, js-codeeditor, js-codemirror, js-completer, js-console, js-coreutils, js-csvviewer, js-docmanager, js-docregistry, js-filebrowser, js-fileeditor, js-imageviewer, js-inspector, js-logconsole, js-mainmenu, js-nbformat, js-notebook, js-observables, js-outputarea, js-rendermime, js-services, js-settingregistry, js-statedb, js-statusbar, js-terminal, js-ui-components]
  9. fail-fast: false
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Set up Python
  14. uses: actions/setup-python@v1
  15. with:
  16. python-version: 3.8
  17. - name: Set up Node
  18. uses: actions/setup-node@v1
  19. with:
  20. node-version: '12.x'
  21. - name: Cache pip on Linux
  22. uses: actions/cache@v1
  23. if: startsWith(runner.os, 'Linux')
  24. with:
  25. path: ~/.cache/pip
  26. key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
  27. restore-keys: |
  28. ${{ runner.os }}-pip-${{ matrix.python }}
  29. # Cache yarn
  30. - name: Get yarn cache directory path
  31. id: yarn-cache-dir-path
  32. run: echo "::set-output name=dir::$(yarn cache dir)"
  33. - name: Cache yarn
  34. uses: actions/cache@v1
  35. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  36. with:
  37. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  38. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  39. restore-keys: |
  40. ${{ runner.os }}-yarn-
  41. - name: Install dependencies
  42. env:
  43. GROUP: ${{ matrix.group }}
  44. run: |
  45. bash ./scripts/ci_install.sh
  46. - name: Run test ${{ matrix.group }}
  47. env:
  48. GROUP: ${{ matrix.group }}
  49. run: |
  50. bash ./scripts/ci_script.sh
  51. linuxtests:
  52. name: Linux
  53. strategy:
  54. matrix:
  55. group: [integrity, docs, python, usage, nonode]
  56. python: [3.5, 3.8]
  57. exclude:
  58. - group: integrity
  59. python: 3.5
  60. - group: docs
  61. python: 3.5
  62. fail-fast: false
  63. runs-on: ubuntu-latest
  64. steps:
  65. - uses: actions/checkout@v2
  66. - name: Set up Python
  67. uses: actions/setup-python@v1
  68. with:
  69. python-version: ${{ matrix.python }}
  70. - name: Set up Node
  71. uses: actions/setup-node@v1
  72. with:
  73. node-version: '12.x'
  74. - name: Cache pip on Linux
  75. uses: actions/cache@v1
  76. if: startsWith(runner.os, 'Linux')
  77. with:
  78. path: ~/.cache/pip
  79. key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
  80. restore-keys: |
  81. ${{ runner.os }}-pip-${{ matrix.python }}
  82. # Cache yarn
  83. - name: Get yarn cache directory path
  84. id: yarn-cache-dir-path
  85. run: echo "::set-output name=dir::$(yarn cache dir)"
  86. - name: Cache yarn
  87. uses: actions/cache@v1
  88. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  89. with:
  90. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  91. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  92. restore-keys: |
  93. ${{ runner.os }}-yarn-
  94. - name: Install dependencies
  95. env:
  96. GROUP: ${{ matrix.group }}
  97. run: |
  98. bash ./scripts/ci_install.sh
  99. - name: Run test ${{ matrix.group }}
  100. env:
  101. GROUP: ${{ matrix.group }}
  102. run: |
  103. bash ./scripts/ci_script.sh
  104. windowstests:
  105. name: Windows
  106. strategy:
  107. matrix:
  108. group: [javascript, python, integrity]
  109. fail-fast: false
  110. runs-on: windows-latest
  111. steps:
  112. - uses: actions/checkout@v2
  113. - name: Set up Python
  114. uses: actions/setup-python@v1
  115. with:
  116. python-version: 3.5
  117. - name: Set up Node
  118. uses: actions/setup-node@v1
  119. with:
  120. node-version: '12.x'
  121. - name: Cache pip on Windows
  122. uses: actions/cache@v1
  123. if: startsWith(runner.os, 'Windows')
  124. with:
  125. path: ~\AppData\Local\pip\Cache
  126. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
  127. restore-keys: |
  128. ${{ runner.os }}-pip-
  129. # Cache yarn
  130. - name: Get yarn cache directory path
  131. id: yarn-cache-dir-path
  132. run: echo "::set-output name=dir::$(yarn cache dir)"
  133. - name: Cache yarn
  134. uses: actions/cache@v1
  135. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  136. with:
  137. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  138. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  139. restore-keys: |
  140. ${{ runner.os }}-yarn-
  141. - name: Enable long paths
  142. run: powershell Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
  143. - name: Upgrade pip
  144. run: python -m pip install -U pip
  145. - name: Install pip deps
  146. run: pip install --upgrade -e ".[test]"
  147. - name: List kernels
  148. run: jupyter kernelspec list
  149. - name: List jlpm versions
  150. run: jlpm versions
  151. - name: List jlpm config
  152. run: jlpm config current
  153. - name: Run test ${{ matrix.group }}
  154. env:
  155. NAME: ${{ matrix.group }}
  156. run: cmd /E:ON /V:ON /C .\\scripts\\appveyor.cmd