logseq-common.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: logseq/common CI
  2. on:
  3. # Path filters ensure jobs only kick off if a change is made to common
  4. push:
  5. branches: [master]
  6. paths:
  7. - 'deps/common/**'
  8. - '.github/workflows/logseq-common.yml'
  9. - '!deps/common/**.md'
  10. pull_request:
  11. branches: [master]
  12. paths:
  13. - 'deps/common/**'
  14. - '.github/workflows/logseq-common.yml'
  15. - '!deps/common/**.md'
  16. defaults:
  17. run:
  18. working-directory: deps/common
  19. env:
  20. CLOJURE_VERSION: '1.10.1.763'
  21. JAVA_VERSION: '11'
  22. # This is the latest node version we can run.
  23. NODE_VERSION: '18'
  24. BABASHKA_VERSION: '1.0.168'
  25. jobs:
  26. test:
  27. runs-on: ubuntu-latest
  28. steps:
  29. - name: Checkout
  30. uses: actions/checkout@v3
  31. - name: Set up Java
  32. uses: actions/setup-java@v3
  33. with:
  34. distribution: 'zulu'
  35. java-version: ${{ env.JAVA_VERSION }}
  36. - name: Set up Clojure
  37. uses: DeLaGuardo/[email protected]
  38. with:
  39. cli: ${{ env.CLOJURE_VERSION }}
  40. bb: ${{ env.BABASHKA_VERSION }}
  41. - name: Run clj-kondo lint
  42. run: clojure -M:clj-kondo --parallel --lint src test
  43. - name: Clojure cache
  44. uses: actions/cache@v3
  45. id: clojure-deps
  46. with:
  47. path: |
  48. ~/.m2/repository
  49. ~/.gitlibs
  50. key: ${{ runner.os }}-clojure-deps-${{ hashFiles('deps.edn') }}
  51. restore-keys: ${{ runner.os }}-clojure-deps-
  52. - name: Fetch Clojure deps
  53. if: steps.clojure-deps.outputs.cache-hit != 'true'
  54. run: clojure -A:test -P
  55. - name: Run ClojureScript tests
  56. run: clojure -M:test