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:
Gabriel Horner
2022-05-25 17:38:06 -04:00
parent 15b8e5e9df
commit 1e299052ce
14 changed files with 638 additions and 317 deletions

View File

@@ -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