-
-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (49 loc) · 1.65 KB
/
node.js.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
46
47
48
49
50
51
52
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Compile and test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
if: >-
!(
contains(github.event.head_commit.message, '[skip test]') ||
contains(github.event.head_commit.message, '[test skip]')
)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn build
- run: yarn test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
repository: xyj-3/sarif-js-sdk
ref: e23ca2d8dc6d70a7959a2098eba8ac332de907bb
path: sarif-js-sdk
- name: Install ESLint formatter
run: yarn add file:sarif-js-sdk/packages/eslint-formatter-sarif
- name: Run ESLint with formatter
run: yarn lint --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
- name: Upload ESLint result to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true