forked from logseq/logseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup CI jobs that are only for graph-parser
Also move all non graph-parser fns to frontend thanks to carve lint
- Loading branch information
1 parent
4813d90
commit 15b8e5e
Showing
26 changed files
with
304 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: logseq graph-parser CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- 'deps/graph-parser/**' | ||
- '!deps/graph-parser/**.md' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'deps/graph-parser/**' | ||
- '!deps/graph-parser/**.md' | ||
|
||
env: | ||
CLOJURE_VERSION: '1.10.1.727' | ||
# setup-java@v2 dropped support for legacy Java version syntax. | ||
# This is the same as 1.8. | ||
JAVA_VERSION: '8' | ||
# This is the latest node version we can run. | ||
NODE_VERSION: '16' | ||
BABASHKA_VERSION: '0.8.1' | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Set up Clojure | ||
uses: DeLaGuardo/setup-clojure@master | ||
with: | ||
cli: ${{ env.CLOJURE_VERSION }} | ||
|
||
- name: Setup Babashka | ||
uses: turtlequeue/[email protected] | ||
with: | ||
babashka-version: ${{ env.BABASHKA_VERSION }} | ||
|
||
- name: Run clj-kondo lint | ||
run: cd deps/graph-parser && clojure -M:clj-kondo --parallel --lint src test | ||
|
||
- name: Lint for vars that are too large | ||
run: scripts/large_vars.clj deps/graph-parser/src | ||
|
||
- name: Carve lint for unused vars | ||
run: cd deps/graph-parser && ../../scripts/carve.clj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{:paths ["src"] | ||
:api-namespaces [ | ||
;; carve doesn't detect nbb only usage | ||
logseq.graph-parser.log] | ||
logseq.graph-parser.log | ||
;; Used by logseq but not worth splitting up | ||
logseq.graph-parser.db.schema] | ||
:report {:format :ignore}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
;; For CLI | ||
logseq.graph-parser.cli/parse | ||
;; For CLI | ||
logseq.graph-parser.db/start-conn | ||
;; For CLI | ||
logseq.graph-parser.mldoc/ast-export-markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{:linters | ||
{:unresolved-symbol {:exclude [;; TODO: Remove parse-* and update-* when https://github.com/clj-kondo/clj-kondo/issues/1694 is done | ||
parse-long | ||
parse-double | ||
parse-uuid | ||
update-keys | ||
update-vals]} | ||
|
||
:consistent-alias | ||
{:aliases {datascript.core d | ||
logseq.graph-parser graph-parser | ||
logseq.graph-parser.text text | ||
logseq.graph-parser.block gp-block | ||
logseq.graph-parser.mldoc gp-mldoc | ||
logseq.graph-parser.util gp-util | ||
logseq.graph-parser.property gp-property | ||
logseq.graph-parser.config gp-config | ||
logseq.graph-parser.date-time-util date-time-util}}} | ||
:lint-as {promesa.core/let clojure.core/let} | ||
:skip-comments true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.clj-kondo/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.