1
0

db.yml 2.4 KB

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