Skip to content

Commit c8a5852

Browse files
committed
Run JS lint/tests
1 parent 5004b6f commit c8a5852

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

.github/workflows/ci.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22
on: [push, pull_request]
33
jobs:
4-
test:
4+
ruby:
55
name: Test on ruby ${{ matrix.ruby }} and rails ${{ matrix.rails }}
66
runs-on: ubuntu-latest
77
services:
@@ -62,3 +62,17 @@ jobs:
6262
bundler-cache: true # 'bundle install' and cache gems
6363
- name: Run Rake with Rails ${{ matrix.rails }}
6464
run: bundle exec rake
65+
js:
66+
name: JS
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v3
70+
- uses: actions/setup-node@v3
71+
with:
72+
cache: 'yarn'
73+
cache-dependency-path: packages/expressions/yarn.lock
74+
- name: Run yarn lint + test
75+
run: |
76+
cd packages/expressions
77+
yarn lint
78+
yarn test

packages/expressions/examples/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { basename } from 'path'
22

3-
const modules = import.meta.glob("./*.json", { eager: true, import: 'default' })
3+
const modules = import.meta.glob('./*.json', { eager: true, import: 'default' })
44

55
export default Object.fromEntries(Object.entries(modules).map(([path, module]) => {
66
return [basename(path, '.json'), module]

packages/expressions/schemas/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const modules = import.meta.glob('./*.json', { eager: true, import: 'default' })
22
const schemas = Object.fromEntries(Object.entries(modules).map(([path, module]) => {
3-
const name = path.split('/').pop().split('.').shift();
4-
return [name == 'schema' ? 'default' : name, module];
5-
}));
3+
const name = path.split('/').pop().split('.').shift()
4+
return [name === 'schema' ? 'default' : name, module]
5+
}))
66

7-
export default schemas;
7+
export default schemas

0 commit comments

Comments
 (0)