Skip to content

Commit

Permalink
Run linter on all relevant file changes. (#383)
Browse files Browse the repository at this point in the history
* Fix: lint errors in bulk.yml.

Signed-off-by: dblock <[email protected]>

* Run linter on all PRs.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jul 8, 2024
1 parent 122207c commit c609ec0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 16 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches: ['**']
paths:
- '**/*.yaml'
- '**/*.ts'
pull_request:
branches: ['**']
paths:
- '**/*.yaml'
- '**/*.ts'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Dependencies
run: npm install

- name: Lint
run: npm run lint
3 changes: 0 additions & 3 deletions .github/workflows/test-tools-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Lint
run: npm run lint

- name: Tests
run: |
npm run test:unit -- --coverage
Expand Down
26 changes: 13 additions & 13 deletions tests/_core/bulk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ chapters:
request_body:
content_type: application/x-ndjson
payload:
- { create: { _index: movies } }
- { director: Bennett Miller, title: Moneyball, year: 2011 }
- {create: {_index: movies}}
- {director: Bennett Miller, title: Moneyball, year: 2011}
- synopsis: Bulk document CRUD.
path: /_bulk
method: POST
request_body:
content_type: application/x-ndjson
payload:
- { create: { _index: books, _id: book_1392214 } }
- { author: Harper Lee, title: To Kill a Mockingbird, year: 1960 }
- { update: { _index: books, _id: book_1392214 } }
- { doc: { pages: 376 } }
- { update: { _index: books, _id: book_1392214 } }
- { doc: { pages: 376 }, _source: true }
- { update: { _index: books, _id: book_1392214 } }
- { script: { source: 'ctx._source.pages = 376;' } }
- { update: { _index: books, _id: does_not_exist } }
- { script: { source: 'ctx.op = "none";' }, scripted_upsert: true, upsert: { pages: 375 } }
- { delete: { _index: books, _id: book_1392214 } }
- {create: {_index: books, _id: book_1392214}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {update: {_index: books, _id: book_1392214}}
- {doc: {pages: 376}}
- {update: {_index: books, _id: book_1392214}}
- {doc: {pages: 376}, _source: true}
- {update: {_index: books, _id: book_1392214}}
- {script: {source: 'ctx._source.pages = 376;'}}
- {update: {_index: books, _id: does_not_exist}}
- {script: {source: 'ctx.op = "none";'}, scripted_upsert: true, upsert: {pages: 375}}
- {delete: {_index: books, _id: book_1392214}}

0 comments on commit c609ec0

Please sign in to comment.