outliner.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. name: logseq/outliner CI
  2. on:
  3. # Path filters ensure jobs only kick off if a change is made to outliner or
  4. # its local dependencies
  5. push:
  6. branches: [master]
  7. paths:
  8. - 'deps/outliner/**'
  9. - '.github/workflows/outliner.yml'
  10. - '!deps/outliner/**.md'
  11. # Deps that logseq/outliner depends on should trigger this workflow
  12. - 'deps/graph-parser/**'
  13. - 'deps/db/**'
  14. - 'deps/common/**'
  15. pull_request:
  16. branches: [master]
  17. paths:
  18. - 'deps/outliner/**'
  19. - '.github/workflows/outliner.yml'
  20. - '!deps/outliner/**.md'
  21. # Deps that logseq/outliner depends on should trigger this workflow
  22. - 'deps/graph-parser/**'
  23. - 'deps/db/**'
  24. - 'deps/common/**'
  25. defaults:
  26. run:
  27. working-directory: deps/outliner
  28. env:
  29. CLOJURE_VERSION: '1.11.1.1413'
  30. # This is the same as 1.8.
  31. JAVA_VERSION: '11'
  32. # This is the latest node version we can run.
  33. NODE_VERSION: '22'
  34. BABASHKA_VERSION: '1.0.168'
  35. jobs:
  36. test:
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Checkout
  40. uses: actions/checkout@v4
  41. - name: Set up Node
  42. uses: actions/setup-node@v4
  43. with:
  44. node-version: ${{ env.NODE_VERSION }}
  45. cache: 'yarn'
  46. cache-dependency-path: deps/outliner/yarn.lock
  47. - name: Set up Java
  48. uses: actions/setup-java@v4
  49. with:
  50. distribution: 'zulu'
  51. java-version: ${{ env.JAVA_VERSION }}
  52. # Clojure needed for bb step
  53. - name: Set up Clojure
  54. uses: DeLaGuardo/[email protected]
  55. with:
  56. cli: ${{ env.CLOJURE_VERSION }}
  57. bb: ${{ env.BABASHKA_VERSION }}
  58. - name: Fetch yarn deps
  59. run: yarn install --frozen-lockfile
  60. - name: Run nbb-logseq tests
  61. run: yarn test
  62. # In this job because it depends on an npm package
  63. - name: Load namespaces into nbb-logseq
  64. run: bb test:load-all-namespaces-with-nbb .
  65. lint:
  66. runs-on: ubuntu-latest
  67. steps:
  68. - name: Checkout
  69. uses: actions/checkout@v4
  70. - name: Set up Java
  71. uses: actions/setup-java@v4
  72. with:
  73. distribution: 'zulu'
  74. java-version: ${{ env.JAVA_VERSION }}
  75. - name: Set up Clojure
  76. uses: DeLaGuardo/[email protected]
  77. with:
  78. cli: ${{ env.CLOJURE_VERSION }}
  79. bb: ${{ env.BABASHKA_VERSION }}
  80. - name: Run clj-kondo lint
  81. run: clojure -M:clj-kondo --lint src test
  82. - name: Carve lint for unused vars
  83. run: bb lint:carve
  84. - name: Lint for vars that are too large
  85. run: bb lint:large-vars
  86. - name: Lint for namespaces that aren't documented
  87. run: bb lint:ns-docstrings
  88. - name: Lint for public vars that are private based on usage
  89. run: bb lint:minimize-public-vars