mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 16:15:21 +00:00
Setup cljs tests for graph-parser
- Also reuse docs graph test assertions to ensure main app and graph-parser are in sync. - Removed promesa from extract tests since they are no longer async - Added cljs and npm deps that were missing and caught by cljs tests
This commit is contained in:
58
.github/workflows/graph-parser.yml
vendored
58
.github/workflows/graph-parser.yml
vendored
@@ -19,9 +19,65 @@ env:
|
||||
JAVA_VERSION: '8'
|
||||
# This is the latest node version we can run.
|
||||
NODE_VERSION: '16'
|
||||
BABASHKA_VERSION: '0.8.1'
|
||||
BABASHKA_VERSION: '0.8.2'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: deps/graph-parser/yarn.lock
|
||||
|
||||
- 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/setup-babashka@v1.3.0
|
||||
# with:
|
||||
# babashka-version: ${{ env.BABASHKA_VERSION }}
|
||||
|
||||
- name: Clojure cache
|
||||
uses: actions/cache@v2
|
||||
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: Fetch yarn deps
|
||||
run: cd deps/graph-parser && yarn install --frozen-lockfile
|
||||
|
||||
- name: Run ClojureScript tests
|
||||
run: clojure -M:test
|
||||
|
||||
- name: Run nbb-logseq tests
|
||||
run: cd deps/graph-parser && yarn nbb-logseq -cp src:test -m logseq.graph-parser.nbb-test-runner/run-tests
|
||||
|
||||
# # In this job because it depends on an npm package
|
||||
# - name: Load nbb compatible namespaces
|
||||
# run: bb test:load-nbb-compatible-namespaces
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user