Skip to content

Commit

Permalink
Run JS lint/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Mar 31, 2023
1 parent 5004b6f commit e88da6d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on: [push, pull_request]
jobs:
test:
ruby:
name: Test on ruby ${{ matrix.ruby }} and rails ${{ matrix.rails }}
runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -62,3 +62,17 @@ jobs:
bundler-cache: true # 'bundle install' and cache gems
- name: Run Rake with Rails ${{ matrix.rails }}
run: bundle exec rake
js:
name: JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn'
cache-dependency-path: packages/expressions/yarn.json
- name: Run yarn lint + test
run: |
cd packages/expressions
yarn lint
yarn test
2 changes: 1 addition & 1 deletion packages/expressions/examples/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { basename } from 'path'

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

export default Object.fromEntries(Object.entries(modules).map(([path, module]) => {
return [basename(path, '.json'), module]
Expand Down
8 changes: 4 additions & 4 deletions packages/expressions/schemas/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const modules = import.meta.glob('./*.json', { eager: true, import: 'default' })
const schemas = Object.fromEntries(Object.entries(modules).map(([path, module]) => {
const name = path.split('/').pop().split('.').shift();
return [name == 'schema' ? 'default' : name, module];
}));
const name = path.split('/').pop().split('.').shift()
return [name === 'schema' ? 'default' : name, module]
}))

export default schemas;
export default schemas

0 comments on commit e88da6d

Please sign in to comment.