graph-parser.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: logseq graph-parser CI
  2. on:
  3. push:
  4. branches: [master]
  5. paths:
  6. - 'deps/graph-parser/**'
  7. - '!deps/graph-parser/**.md'
  8. pull_request:
  9. branches: [master]
  10. paths:
  11. - 'deps/graph-parser/**'
  12. - '!deps/graph-parser/**.md'
  13. env:
  14. CLOJURE_VERSION: '1.10.1.727'
  15. # setup-java@v2 dropped support for legacy Java version syntax.
  16. # This is the same as 1.8.
  17. JAVA_VERSION: '8'
  18. # This is the latest node version we can run.
  19. NODE_VERSION: '16'
  20. BABASHKA_VERSION: '0.8.1'
  21. jobs:
  22. lint:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - name: Checkout
  26. uses: actions/checkout@v2
  27. - name: Set up Java
  28. uses: actions/setup-java@v2
  29. with:
  30. distribution: 'zulu'
  31. java-version: ${{ env.JAVA_VERSION }}
  32. - name: Set up Clojure
  33. uses: DeLaGuardo/setup-clojure@master
  34. with:
  35. cli: ${{ env.CLOJURE_VERSION }}
  36. - name: Setup Babashka
  37. uses: turtlequeue/[email protected]
  38. with:
  39. babashka-version: ${{ env.BABASHKA_VERSION }}
  40. - name: Run clj-kondo lint
  41. run: cd deps/graph-parser && clojure -M:clj-kondo --parallel --lint src test
  42. - name: Lint for vars that are too large
  43. run: scripts/large_vars.clj deps/graph-parser/src
  44. - name: Carve lint for unused vars
  45. run: cd deps/graph-parser && ../../scripts/carve.clj