linuxtests.yml 1.9 KB

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