test_suite.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. name: Test suite
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - develop
  7. pull_request:
  8. jobs:
  9. # the following are optional jobs and need to be configured according
  10. # to this project's settings:
  11. #
  12. # lintcode:
  13. # name: Javascript lint
  14. # runs-on: ubuntu-latest
  15. # steps:
  16. # - name: checkout
  17. # uses: actions/checkout@v2
  18. #
  19. # - name: setup node
  20. # uses: actions/setup-node@v1
  21. # with:
  22. # node-version: '12.x'
  23. #
  24. # - name: cache dependencies
  25. # uses: actions/cache@v1
  26. # with:
  27. # path: ~/.npm
  28. # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
  29. # restore-keys: |
  30. # ${{ runner.os }}-node-
  31. #
  32. # - run: npm install
  33. # - run: npm run lint:code
  34. #
  35. # lintstyle:
  36. # name: SCSS lint
  37. # runs-on: ubuntu-latest
  38. # needs: [lintcode]
  39. # steps:
  40. # - name: checkout
  41. # uses: actions/checkout@v2
  42. #
  43. # - name: setup node
  44. # uses: actions/setup-node@v1
  45. # with:
  46. # node-version: '12.x'
  47. #
  48. # - name: cache dependencies
  49. # uses: actions/cache@v1
  50. # with:
  51. # path: ~/.npm
  52. # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
  53. # restore-keys: |
  54. # ${{ runner.os }}-node-
  55. # - run: npm install
  56. # - run: npm run lint:style
  57. #
  58. # lintdocs:
  59. # name: documentation lint
  60. # runs-on: ubuntu-latest
  61. # needs: [lintcode,lintstyle]
  62. # steps:
  63. # - name: checkout
  64. # uses: actions/checkout@v2
  65. #
  66. # - name: setup node
  67. # uses: actions/setup-node@v1
  68. # with:
  69. # node-version: '12.x'
  70. #
  71. # - name: cache dependencies
  72. # uses: actions/cache@v1
  73. # with:
  74. # path: ~/.npm
  75. # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
  76. # restore-keys: |
  77. # ${{ runner.os }}-node-
  78. #
  79. # - run: npm install
  80. # - run: npm run lint:markdown
  81. tests:
  82. name: Meteor ${{ matrix.meteor }} tests
  83. runs-on: ubuntu-latest
  84. steps:
  85. # CHECKOUTS
  86. - name: Checkout
  87. uses: actions/checkout@v2
  88. # CACHING
  89. - name: Install Meteor
  90. id: cache-meteor-install
  91. uses: actions/cache@v2
  92. with:
  93. path: ~/.meteor
  94. key: v1-meteor-${{ hashFiles('.meteor/versions') }}
  95. restore-keys: |
  96. v1-meteor-
  97. - name: Cache NPM dependencies
  98. id: cache-meteor-npm
  99. uses: actions/cache@v2
  100. with:
  101. path: ~/.npm
  102. key: v1-npm-${{ hashFiles('package-lock.json') }}
  103. restore-keys: |
  104. v1-npm-
  105. - name: Cache Meteor build
  106. id: cache-meteor-build
  107. uses: actions/cache@v2
  108. with:
  109. path: |
  110. .meteor/local/resolver-result-cache.json
  111. .meteor/local/plugin-cache
  112. .meteor/local/isopacks
  113. .meteor/local/bundler-cache/scanner
  114. key: v1-meteor_build_cache-${{ github.ref }}-${{ github.sha }}
  115. restore-key: |
  116. v1-meteor_build_cache-
  117. - name: Setup meteor
  118. uses: meteorengineer/setup-meteor@v1
  119. with:
  120. meteor-release: '2.2'
  121. - name: Install NPM Dependencies
  122. run: meteor npm ci
  123. - name: Run Tests
  124. run: sh ./test-wkan.sh -cv
  125. - name: Upload coverage
  126. uses: actions/upload-artifact@v2
  127. with:
  128. name: coverage-folder
  129. path: .coverage/
  130. coverage:
  131. name: Coverage report
  132. runs-on: ubuntu-latest
  133. needs: [tests]
  134. steps:
  135. - name: Checkout
  136. uses: actions/checkout@v2
  137. - name: Download coverage
  138. uses: actions/download-artifact@v2
  139. with:
  140. name: coverage-folder
  141. path: .coverage/
  142. - name: Coverage Report
  143. uses: VeryGoodOpenSource/very_good_coverage@v1.1.1
  144. with:
  145. path: ".coverage/lcov.info"
  146. min_coverage: 1 # TODO add tests and increase to 95!