|
22 | 22 | - name: Install dependencies |
23 | 23 | run: | |
24 | 24 | pip install -r requirements-travis.txt |
25 | | - - name: List files in the repository |
26 | | - run: | |
27 | | - ls ${{ github.workspace }} |
28 | 25 | - name: Analysing the code with pylint |
29 | 26 | run: | |
30 | 27 | inspekt checkall --disable-lint W,R,C,E1002,E1101,E1103,E1120,F0401,I0011,E0203,E711,W605,E721 --no-license-check |
31 | 28 | inspekt indent |
32 | 29 | inspekt style |
33 | | - error="" |
34 | | - for COMMIT in $(git rev-list ${{ github.event.pull_request.commits }}); do |
35 | | - echo "-----< $(git log -1 --oneline $COMMIT) >-----" |
36 | | - msg=$(git show -s --format=%B $COMMIT) |
37 | | - # Skip merge commits |
38 | | - if [ $(echo "${msg::4}") == 'Merg' ] |
39 | | - then |
40 | | - continue |
41 | | - fi |
42 | | - # Skip some commits which make travis fail due to commit message |
43 | | - list='8fd5b57 840e774 c35ffeb' |
44 | | - for item in $list |
45 | | - do |
46 | | - if [ "$COMMIT" == "$item" ]; then |
47 | | - echo "In the list" |
48 | | - continue |
49 | | - fi |
50 | | - done |
51 | | - # Test commit message size |
52 | | - if [ $(echo "$msg" | wc -l) -ge 5 ] |
53 | | - then |
54 | | - echo "OK: Commit message size." |
55 | | - else |
56 | | - echo "ERR: Commit message is too short (less than 5 lines)." |
57 | | - echo " Here a minimal template:" |
58 | | - echo " ------------------------------------" |
59 | | - echo " header <- Limited to 50 characters. No period." |
60 | | - echo " <- Blank line" |
61 | | - echo " message <- Any number of lines, limited to 72 characters per line." |
62 | | - echo " <- Blank line" |
63 | | - echo " Signed-off-by: <- Signature (created by git commit -s)" |
64 | | - echo " ------------------------------------" |
65 | | - error=true |
66 | | - fi |
67 | | - # Test commit message signature |
68 | | - if echo "$msg" | grep -q 'Signed-off-by:' |
69 | | - then |
70 | | - echo "OK: 'Signed-off-by:' present." |
71 | | - else |
72 | | - echo "ERR: 'Signed-off-by:' not found (use '-s' in 'git commit')." |
73 | | - error=true |
74 | | - fi |
75 | | - done |
76 | | - # Look for errors |
77 | | - if [ "$error" ]; then |
78 | | - echo |
79 | | - echo "Incremental smokecheck failed." |
80 | | - exit 1 |
81 | | - fi |
0 commit comments