-
Notifications
You must be signed in to change notification settings - Fork 8
97 lines (90 loc) · 2.72 KB
/
pull_request.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build and test
on: pull_request
jobs:
stylelint:
name: Lint .scss
if: '!github.event.deleted'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: stylelint
uses: reviewdog/action-stylelint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
stylelint_input: './src/**/*.scss'
- name: Lint SCSS
run: yarn lint:scss
typescript:
name: Typescript compile check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run typescript compile check
run: npx tsc --noEmit
eslint:
name: Lint .js and .jsx
if: '!github.event.deleted'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: eslint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
eslint_flags: '--ext .js --ext .jsx ./src/'
- name: Lint Javascript
run: yarn lint:js
markdownlint:
name: Lint markdown
if: '!github.event.deleted'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Install problem matcher
uses: xt0rted/markdownlint-problem-matcher@v3
- name: Lint markdown
run: yarn lint:markdown