diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07a8f829e..a25396b0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -62,3 +62,18 @@ 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.lock + - name: Run yarn lint + test + run: | + cd packages/expressions + yarn install + yarn lint + yarn test diff --git a/packages/expressions/examples/index.js b/packages/expressions/examples/index.js index adcde4d79..e078e9457 100644 --- a/packages/expressions/examples/index.js +++ b/packages/expressions/examples/index.js @@ -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] diff --git a/packages/expressions/schemas/index.js b/packages/expressions/schemas/index.js index 61bdcc4bb..0817fd3cf 100644 --- a/packages/expressions/schemas/index.js +++ b/packages/expressions/schemas/index.js @@ -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