File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Summary
2+
3+ TODO...
4+
15## Expected Behavior
26
7+ TODO...
38
49## Actual Behavior
510
11+ TODo...
612
713## Steps to Reproduce the Problem
814
9151 .
10161 .
11171 .
1218
13- ## Specifications
19+ # Specifications
1420
1521- Python version (` python --version ` )
1622- OS (Mac/Linux/Windows)
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export LANG=C.UTF-8
2121CL_FILE=" ${HOME} /changed_files.txt"
2222
2323if [ -f " ${CL_FILE} " ] && ! grep -q .pylintrc " ${CL_FILE} " ; then
24- cat " $ {HOME} /changed_files.txt" | grep " .py$ " | xargs pylint
24+ grep " .py$ " " $ {HOME} /changed_files.txt" | xargs pylint
2525else
26- find . -iname " *.py" | xargs pylint
26+ find . -iname " *.py" -print0 | xargs pylint
2727fi
Original file line number Diff line number Diff line change @@ -18,17 +18,18 @@ export LANG=C.UTF-8
1818export PIPENV_PYTHON=" ${PYENV_ROOT} /shims/python"
1919export GOOGLE_APPLICATION_CREDENTIALS=" ${HOME} /secrets/default_credentials.json"
2020
21+ dirs=()
22+
2123if [ -f " requirements.txt" ]; then
2224 pipenv install -r " requirements.txt"
2325fi
2426
25- TEST_DIRS= ` find . -name ' *_test.py' -exec dirname ' {}' \; | sort -u`
27+ IFS= $' \n ' read -r -d ' ' -a dirs < <( find . -name ' *_test.py' -exec dirname ' {}' \; | sort -u )
2628
2729exit_code=0
2830
29- for DIR in ${TEST_DIRS[@]} ; do
30- pushd " ${DIR} "
31- echo $DIR
31+ for dir in " ${dirs[@]} " ; do
32+ pushd " ${dir} " || exit
3233 if [ -f " requirements.txt" ]; then
3334 # If requirements.txt present, create a new isolated environment
3435 touch Pipfile
@@ -39,7 +40,7 @@ for DIR in ${TEST_DIRS[@]}; do
3940 if [ $status -ne 0 ]; then
4041 exit_code=$status
4142 fi
42- popd
43+ popd || exit
4344done
4445
4546if [ $exit_code -ne 0 ]; then
Original file line number Diff line number Diff line change 2020 - name : Fetch and Diff PR with base from which it was cloned
2121 if : ${{ github.event.pull_request.base.sha }}
2222 run : |
23- git fetch origin main ${{ github.event.pull_request.base.sha }}
24- git diff --diff-filter=ACM --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > $ HOME/changed_files.txt
23+ git fetch origin main " ${{ github.event.pull_request.base.sha }}"
24+ git diff --diff-filter=ACM --name-only " ${{ github.event.pull_request.base.sha }}" " ${{ github.sha }}" > "${ HOME} /changed_files.txt"
2525 - name : Set up Python ${{ matrix.python-version }}
2626 uses : actions/setup-python@v2
2727 with :
3232 pip install pipenv
3333 - name : Write test credentials
3434 run : |
35- mkdir $ HOME/secrets
36- echo "$DEFAULT_CREDENTIALS" > $ HOME/secrets/default_credentials.json
37- echo "$CLIENT_ID_FILE" > $ HOME/secrets/client_id.json
35+ mkdir "${ HOME} /secrets"
36+ echo "${ DEFAULT_CREDENTIALS} " > "${ HOME} /secrets/default_credentials.json"
37+ echo "${ CLIENT_ID_FILE} " > "${ HOME} /secrets/client_id.json"
3838 env :
3939 DEFAULT_CREDENTIALS : ${{secrets.SNIPPETS_DEFAULT_CREDENTIALS}}
4040 CLIENT_ID_FILE : ${{secrets.SNIPPETS_CLIENT_ID_FILE}}
Original file line number Diff line number Diff line change 2323 - uses : github/super-linter/slim@v4.8.4
2424 env :
2525 ERROR_ON_MISSING_EXEC_BIT : true
26+ VALIDATE_JSCPD : false
27+ VALIDATE_PYTHON_BLACK : false
2628 VALIDATE_ALL_CODEBASE : ${{ github.event_name == 'push' }}
2729 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments