ci.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: Tests
  2. on: [push, pull_request]
  3. jobs:
  4. unit_tests:
  5. name: Unit tests
  6. runs-on: ubuntu-latest
  7. strategy:
  8. matrix:
  9. node-version: [10.x, 12.x, 14.x]
  10. steps:
  11. - name: Checkout sources
  12. uses: actions/checkout@v2
  13. - name: Install Node.js
  14. uses: actions/setup-node@v2-beta
  15. with:
  16. node-version: ${{matrix.node-version}}
  17. - name: Install dependencies
  18. run: npm ci
  19. - name: Run tests
  20. run: npm run test:unit
  21. lint_js:
  22. name: Lint JavaScript
  23. runs-on: ubuntu-latest
  24. steps:
  25. - name: Checkout sources
  26. uses: actions/checkout@v2
  27. - name: Install Node.js
  28. uses: actions/setup-node@v2-beta
  29. with:
  30. node-version: 14.x
  31. - name: Install dependencies
  32. run: npm ci
  33. - name: Run linter
  34. run: npm run lint
  35. lint_md:
  36. name: Lint Markdown
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Checkout sources
  40. uses: actions/checkout@v2
  41. - name: Install Node.js
  42. uses: actions/setup-node@v2-beta
  43. with:
  44. node-version: 14.x
  45. - name: Install dependencies
  46. run: npm ci
  47. - name: Run linter
  48. run: npm run lint:markdown
  49. types:
  50. name: Type tests
  51. runs-on: ubuntu-latest
  52. steps:
  53. - name: Checkout sources
  54. uses: actions/checkout@v2
  55. - name: Install Node.js
  56. uses: actions/setup-node@v2-beta
  57. with:
  58. node-version: 14.x
  59. - name: Install dependencies
  60. run: npm ci
  61. - name: Run linter
  62. run: npm run lint:markdown
  63. # Need to do a bunch of work to generate the locale typings 🙃
  64. - name: Prepare type declarations
  65. run: |
  66. npm run build:lib
  67. npm run build:companion
  68. npm run build:locale-pack
  69. - name: Run type tests
  70. run: npm run test:type