db.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. pull_request:
  11. branches: [master]
  12. paths:
  13. - 'deps/db/**'
  14. - '.github/workflows/db.yml'
  15. - '!deps/db/**.md'
  16. defaults:
  17. run:
  18. working-directory: deps/db
  19. env:
  20. CLOJURE_VERSION: '1.10.1.727'
  21. # This is the same as 1.8.
  22. JAVA_VERSION: '8'
  23. # This is the latest node version we can run.
  24. NODE_VERSION: '16'
  25. BABASHKA_VERSION: '1.0.168'
  26. jobs:
  27. test:
  28. runs-on: ubuntu-latest
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@v3
  32. - name: Set up Node
  33. uses: actions/setup-node@v3
  34. with:
  35. node-version: ${{ env.NODE_VERSION }}
  36. cache: 'yarn'
  37. cache-dependency-path: deps/db/yarn.lock
  38. - name: Set up Java
  39. uses: actions/setup-java@v3
  40. with:
  41. distribution: 'zulu'
  42. java-version: ${{ env.JAVA_VERSION }}
  43. - name: Set up Clojure
  44. uses: DeLaGuardo/setup-clojure@master
  45. with:
  46. cli: ${{ env.CLOJURE_VERSION }}
  47. bb: ${{ env.BABASHKA_VERSION }}
  48. - name: Fetch yarn deps
  49. run: yarn install --frozen-lockfile
  50. # In this job because it depends on an npm package
  51. - name: Load namespaces into nbb-logseq
  52. run: bb test:load-all-namespaces-with-nbb .
  53. lint:
  54. runs-on: ubuntu-latest
  55. steps:
  56. - name: Checkout
  57. uses: actions/checkout@v3
  58. - name: Set up Java
  59. uses: actions/setup-java@v3
  60. with:
  61. distribution: 'zulu'
  62. java-version: ${{ env.JAVA_VERSION }}
  63. - name: Set up Clojure
  64. uses: DeLaGuardo/setup-clojure@master
  65. with:
  66. cli: ${{ env.CLOJURE_VERSION }}
  67. bb: ${{ env.BABASHKA_VERSION }}
  68. - name: Run clj-kondo lint
  69. run: clojure -M:clj-kondo --parallel --lint src
  70. - name: Carve lint for unused vars
  71. run: bb lint:carve 2>/dev/null
  72. - name: Lint for vars that are too large
  73. run: bb lint:large-vars 2>/dev/null
  74. - name: Lint datalog rules
  75. run: bb lint:rules
  76. - name: Lint for namespaces that aren't documented
  77. run: bb lint:ns-docstrings 2>/dev/null