linuxtests.yml 2.6 KB

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