Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow for test+lint and misc fixes
- Setup cljs tests - No need for :no-doc - No need to bind an unused _repo value - Remove unused datascript dep
- Loading branch information
1 parent
e803e2d
commit 94f35bd
Showing
5 changed files
with
102 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: logseq/common CI | ||
|
||
on: | ||
# Path filters ensure jobs only kick off if a change is made to common | ||
push: | ||
branches: [master] | ||
paths: | ||
- 'deps/common/**' | ||
- '.github/workflows/logseq-common.yml' | ||
- '!deps/common/**.md' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'deps/common/**' | ||
- '.github/workflows/logseq-common.yml' | ||
- '!deps/common/**.md' | ||
|
||
defaults: | ||
run: | ||
working-directory: deps/common | ||
|
||
env: | ||
CLOJURE_VERSION: '1.10.1.763' | ||
JAVA_VERSION: '11' | ||
# This is the latest node version we can run. | ||
NODE_VERSION: '18' | ||
BABASHKA_VERSION: '1.0.168' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: ${{ env.JAVA_VERSION }} | ||
|
||
- name: Set up Clojure | ||
uses: DeLaGuardo/setup-clojure@10.1 | ||
with: | ||
cli: ${{ env.CLOJURE_VERSION }} | ||
bb: ${{ env.BABASHKA_VERSION }} | ||
|
||
- name: Run clj-kondo lint | ||
run: clojure -M:clj-kondo --parallel --lint src test | ||
|
||
- name: Clojure cache | ||
uses: actions/cache@v3 | ||
id: clojure-deps | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.gitlibs | ||
key: ${{ runner.os }}-clojure-deps-${{ hashFiles('deps.edn') }} | ||
restore-keys: ${{ runner.os }}-clojure-deps- | ||
|
||
- name: Fetch Clojure deps | ||
if: steps.clojure-deps.outputs.cache-hit != 'true' | ||
run: clojure -A:test -P | ||
|
||
- name: Run ClojureScript tests | ||
run: clojure -M:test |
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,7 +1,8 @@ | ||
{:deps | ||
;; External deps should be kept in sync with https://github.com/logseq/nbb-logseq/blob/main/bb.edn | ||
{datascript/datascript {:mvn/version "1.3.8"}} | ||
:aliases | ||
{:clj-kondo | ||
{:aliases | ||
{:test {:extra-paths ["test"] | ||
:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"} | ||
org.clojure/clojurescript {:mvn/version "1.11.54"}} | ||
:main-opts ["-m" "cljs-test-runner.main"]} | ||
:clj-kondo | ||
{:replace-deps {clj-kondo/clj-kondo {:mvn/version "2022.12.08"}} | ||
:main-opts ["-m" "clj-kondo.main"]}}} |
File renamed without changes.
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