-
Notifications
You must be signed in to change notification settings - Fork 20
33 lines (28 loc) · 1.4 KB
/
PullRequestCheck.yml
File metadata and controls
33 lines (28 loc) · 1.4 KB
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
name: PullRequestCheck
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install dependencies
run: yarn
- name: ESLint
env:
pullRequestId: ${{github.event.number}}
token: ${{secrets.GITHUB_TOKEN}}
run: |
yarn eslint -f checkstyle -o eslint_report.xml 'src/**/*' --ext .js --ext .ts --ext .tsx --ext .vue --ignore-pattern '*.css' --ignore-pattern '*.json' --ignore-pattern '*.yml' || true
yarn violation-comments-to-github-command-line -ot $token -ro FLOIP -rn flow-builder -prid $pullRequestId -comment-only-changed-content true -create-comment-with-all-single-file-comments true -create-single-file-comments true -v "CHECKSTYLE" "." ".*/eslint_report.xml" ESLint || true
- name: PostEslintToGthub
env:
pullRequestId: ${{github.event.number}}
token: ${{secrets.GITHUB_TOKEN}}
if: ${{failure()}}
run: yarn violation-comments-to-github-command-line -ot $token -ro FLOIP -rn flow-builder -prid $pullRequestId -comment-only-changed-content true -create-comment-with-all-single-file-comments true -create-single-file-comments true -show-debug-info -v "CHECKSTYLE" "." ".*/eslint_report.xml" ESLint || true