build.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: CI
  2. on:
  3. push:
  4. branches: [master]
  5. paths-ignore:
  6. - '*.md'
  7. pull_request:
  8. branches: [master]
  9. paths-ignore:
  10. - '*.md'
  11. jobs:
  12. test:
  13. strategy:
  14. matrix:
  15. operating-system: [ubuntu-latest]
  16. runs-on: ${{ matrix.operating-system }}
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v2
  20. with:
  21. fetch-depth: 1
  22. submodules: 'true'
  23. - name: Maven cache
  24. uses: actions/cache@v1
  25. id: maven-cache
  26. with:
  27. path: ~/.m2/repository
  28. key: ${{ runner.os }}-maven-${{ hashFiles('deps.edn') }}
  29. restore-keys: ${{ runner.os }}-maven-
  30. - name: Prepare Java
  31. uses: actions/setup-java@v1
  32. with:
  33. java-version: 1.8
  34. - name: Set up Node
  35. uses: actions/setup-node@v1
  36. with:
  37. node-version: '12'
  38. - name: Install Clojure tools.deps
  39. uses: DeLaGuardo/setup-clojure@master
  40. with:
  41. cli: '1.10.1.727'
  42. - name: Fetch Maven deps
  43. if: steps.maven-cache.outputs.cache-hit != 'true'
  44. run: clojure -A:cljs -P
  45. - name: Get yarn cache directory path
  46. id: yarn-cache-dir-path
  47. run: echo "::set-output name=dir::$(yarn cache dir)"
  48. - name: yarn cache
  49. uses: actions/cache@v1
  50. id: yarn-cache
  51. with:
  52. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  53. key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
  54. restore-keys: |
  55. ${{ runner.os }}-yarn-
  56. - name: Fetch yarn deps
  57. run: yarn cache clean && yarn install --frozen-lockfile
  58. - name: Run Clojure test
  59. run: |
  60. yarn cljs:test
  61. node static/tests.js