-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
57 lines (50 loc) · 1.62 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: 'Logseq Graph Validator'
description: 'Runs tests on a logseq graph to see that some features are correctly used e.g. block refs and queries'
inputs:
directory:
description: 'Directory to parse'
required: true
default: '.'
exclude:
description: 'Validations to exclude'
required: false
default: 'logseq-graph-validator-empty'
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: logseq/graph-validator
path: .logseq-graph-validator
- name: Set up Clojure
uses: DeLaGuardo/setup-clojure@master
with:
cli: 1.11.1.1182
bb: 1.0.164
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: .logseq-graph-validator/yarn.lock
- name: Fetch yarn deps
run: cd .logseq-graph-validator && yarn install --immutable
shell: bash
- name: Nbb cache
uses: actions/cache@v3
id: nbb-deps
with:
path: |
~/.m2/repository
~/.gitlibs
.logseq-graph-validator/.nbb/.cache
key: ${{ runner.os }}-nbb-deps-${{ hashFiles('.logseq-graph-validator/nbb.edn') }}
restore-keys: ${{ runner.os }}-nbb-deps-
- name: Fetch nbb deps
if: steps.nbb-deps.outputs.cache-hit != 'true'
run: cd .logseq-graph-validator && yarn nbb-logseq -e ':fetching-deps'
shell: bash
- name: Run nbb tests
run: cd .logseq-graph-validator && node graph_validator.mjs --directory ${{ inputs.directory }} --exclude ${{ inputs.exclude }}
shell: bash