db.yml 2.2 KB

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