Skip to content

Commit e5c7675

Browse files
authored
Merge pull request #49 from GetStream/feat/pana-check
2 parents 5d19706 + 6d7ef1f commit e5c7675

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/pana.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: pana
2+
3+
env:
4+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- master
10+
push:
11+
branches:
12+
- master
13+
14+
jobs:
15+
faye_dart:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: axel-op/dart-package-analyzer@v3
20+
id: analysis
21+
with:
22+
githubToken: ${{ secrets.GITHUB_TOKEN }}
23+
relativePath: packages/faye_dart
24+
- name: Check scores
25+
env:
26+
# NB: "analysis" is the id set above. Replace it with the one you used if different.
27+
TOTAL: ${{ steps.analysis.outputs.total }}
28+
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
29+
run: |
30+
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
31+
if (( $PERCENTAGE < 80 ))
32+
then
33+
echo Score too low!
34+
exit 1
35+
fi
36+
stream_feed:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: axel-op/dart-package-analyzer@v3
41+
id: analysis
42+
with:
43+
githubToken: ${{ secrets.GITHUB_TOKEN }}
44+
relativePath: packages/stream_feed
45+
- name: Check scores
46+
env:
47+
# NB: "analysis" is the id set above. Replace it with the one you used if different.
48+
TOTAL: ${{ steps.analysis.outputs.total }}
49+
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
50+
run: |
51+
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
52+
if (( $PERCENTAGE < 90 ))
53+
then
54+
echo Score too low!
55+
exit 1
56+
fi

0 commit comments

Comments
 (0)