db.yml 2.4 KB

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