-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (37 loc) · 1.19 KB
/
eslint-sarif-test.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
39
40
41
42
43
44
45
name: ESlint sarif formatter test workflow
on:
pull_request:
branches:
- main
paths:
- 'packages/eslint-formatter-sarif/**'
workflow_dispatch:
jobs:
eslint_sarif_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install ESLint
run: |
npm install eslint
npm install @microsoft/sarif-multitool
- name: Install ESLint SARIF formatter dependencies
run: npm install
- name: Run local eslint + sarif formatter
run: npx eslint ./packages/eslint-formatter-sarif
--ext .js,.jsx,.ts,.tsx
--format ./packages/eslint-formatter-sarif/sarif.js
--output-file eslint-results.sarif
continue-on-error: true
- name: Upload eslint results as artifact
uses: actions/upload-artifact@v2
with:
name: eslint-results
path: eslint-results.sarif
- name: Validate sarif file
run: npx @microsoft/sarif-multitool validate eslint-results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: eslint-results.sarif
wait-for-processing: true