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
This commit is contained in:
Gabriel Horner
2023-03-21 17:24:35 -04:00
committed by Andelf
parent e803e2d576
commit 94f35bda18
5 changed files with 102 additions and 34 deletions

67
.github/workflows/logseq-common.yml vendored Normal file
View File

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