Skip to content

Commit adf760a

Browse files
Add ci workflow
1 parent 355795f commit adf760a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: python Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
check-style:
11+
name: Find Trailing Whitespace
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Find Trailing Whitespace
16+
run: |
17+
set +e
18+
lines=$(git grep --cached -In '[[:blank:]]$')
19+
if [ ! -z "$lines" ]; then
20+
echo -e "\n The following lines contain trailing whitespace: \n"
21+
echo -e "${lines}"
22+
echo -e "\nFailed.\n"
23+
exit 1
24+
fi
25+
exit 0

0 commit comments

Comments
 (0)