File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test
2
+ on :
3
+ push :
4
+ branches : [master]
5
+ pull_request :
6
+ branches : [master]
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Setup Node
13
+ uses : actions/setup-node@v2
14
+ with :
15
+ node-version : 17
16
+ - name : Cache Yarn
17
+ uses : actions/cache@v2
18
+ with :
19
+ path : ' **/node_modules'
20
+ key : ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
21
+ restore-keys : |
22
+ ${{ runner.os }}-yarn-
23
+ - run : yarn install --frozen-lockfile
24
+ - run : yarn test
25
+ env :
26
+ CI : true
27
+ eslint :
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v2
31
+ - name : Setup Node
32
+ uses : actions/setup-node@v2
33
+ with :
34
+ node-version : 18
35
+ - name : Cache Yarn
36
+ uses : actions/cache@v2
37
+ with :
38
+ path : ' **/node_modules'
39
+ key : ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
40
+ restore-keys : |
41
+ ${{ runner.os }}-yarn-
42
+ - run : yarn install --frozen-lockfile
43
+ - run : yarn lint-fix
44
+ - run : yarn prettier
45
+ - name : Auto commit fixed code
46
+ id : auto-commit-action
47
+ uses : stefanzweifel/git-auto-commit-action@v4
48
+ with :
49
+ commit_message : Apply auto lint-fix changes
50
+ branch : ${{ github.head_ref }}
51
+ - name : eslint
52
+ if : steps.auto-commit-action.outputs.changes_detected == 'false'
53
+ uses : reviewdog/action-eslint@v1
54
+ with :
55
+ level : warning
56
+ reporter : github-pr-review
You can’t perform that action at this time.
0 commit comments