linuxtests.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. name: Linux Tests
  2. on: [push, pull_request]
  3. jobs:
  4. linuxtests:
  5. name: Linux
  6. strategy:
  7. matrix:
  8. group: [integrity, integrity2, integrity3, docs, usage, usage2, python, examples, interop, nonode, linkcheck, lint]
  9. python: [3.6, 3.8]
  10. exclude:
  11. - group: integrity
  12. python: 3.6
  13. - group: integrity2
  14. python: 3.6
  15. - group: integrity3
  16. python: 3.6
  17. - group: docs
  18. python: 3.6
  19. - group: usage
  20. python: 3.6
  21. - group: usage2
  22. python: 3.6
  23. - group: linkcheck
  24. python: 3.6
  25. - group: nonode
  26. python: 3.6
  27. - group: lint
  28. python: 3.6
  29. - group: examples
  30. python: 3.6
  31. fail-fast: false
  32. timeout-minutes: 20
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v2
  36. - name: Set up Python
  37. uses: actions/setup-python@v1
  38. with:
  39. python-version: ${{ matrix.python }}
  40. - name: Set up Node
  41. uses: actions/setup-node@v1
  42. with:
  43. node-version: '12.x'
  44. - name: Cache pip on Linux
  45. uses: actions/cache@v2
  46. if: startsWith(runner.os, 'Linux')
  47. with:
  48. path: ~/.cache/pip
  49. key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt', 'setup.py') }}
  50. restore-keys: |
  51. ${{ runner.os }}-pip-${{ matrix.python }}
  52. - name: Get yarn cache directory path
  53. id: yarn-cache-dir-path
  54. run: echo "::set-output name=dir::$(yarn cache dir)"
  55. - name: Cache yarn
  56. uses: actions/cache@v2
  57. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  58. with:
  59. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  60. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  61. restore-keys: |
  62. ${{ runner.os }}-yarn-
  63. - name: Cache checked links build
  64. uses: actions/cache@v2
  65. if: ${{ matrix.group == 'linkcheck' }}
  66. with:
  67. path: ~/.cache/pytest-link-check
  68. key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/*.rst') }}-changelog
  69. restore-keys: |
  70. ${{ runner.os }}-linkcheck-
  71. - name: Install dependencies
  72. env:
  73. GROUP: ${{ matrix.group }}
  74. run: |
  75. bash ./scripts/ci_install.sh
  76. - name: Run test ${{ matrix.group }}
  77. env:
  78. GROUP: ${{ matrix.group }}
  79. run: |
  80. bash ./scripts/ci_script.sh