File tree 1 file changed +5
-9
lines changed
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 14
14
steps :
15
15
- name : Checkout cli core repo
16
16
uses : actions/checkout@v2
17
+ with :
18
+ # Disabling shallow clone is recommended for improving relevancy of reporting
19
+ fetch-depth : 0
17
20
- run : npm install
18
21
- name : Use Node.js ${{ matrix.node-version }}
19
22
uses : actions/setup-node@v2
@@ -22,21 +25,14 @@ jobs:
22
25
cache : ' npm'
23
26
- name : Run tests
24
27
run : npm test
25
- sonarcloud :
26
- runs-on : ubuntu-latest
27
- steps :
28
- - uses : actions/checkout@v2
29
- with :
30
- # Disabling shallow clone is recommended for improving relevancy of reporting
31
- fetch-depth : 0
32
28
- name : SonarCloud Scan
33
29
uses : sonarsource/sonarcloud-github-action@master
34
30
env :
35
31
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
32
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
37
33
notify-complete-fail :
38
- if : ${{ failure() || cancelled() }}
39
- needs : [ test, sonarcloud ]
34
+ if : ${{ failure() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
35
+ needs : [ test ]
40
36
name : Notify Test Failed
41
37
runs-on : ubuntu-latest
42
38
steps :
You can’t perform that action at this time.
0 commit comments