forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (31 loc) · 1.18 KB
/
js-lint.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: "Lint Ruby files using Rubocop"
on:
push:
pull_request_target:
types: [ opened, reopened ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run ESLint and generate SARIF output
run: yarn eslint 'src/**/*.js' --format json --output-file eslint-output.json
- name: Convert ESLint output to SARIF
run: yarn sarif-convert -o eslint-output.sarif eslint-output.json
- name: Upload SARIF output
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: eslint-output.sarif