Skip to content

Commit a24d8ab

Browse files
adrianfuscoeshack94
authored andcommitted
Update/run ci script (bregman-arie#352)
* New questions and spell check (bregman-arie#181) Added new questions related with KVM, Libvirt and DNF * Improve run_ci script readability * Change shell in workflow
1 parent 44b96ab commit a24d8ab

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

.github/workflows/ci_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
- name: Give executable permissions to run_ci.sh inside the scripts directory
1515
run: chmod a+x scripts/run_ci.sh
1616
- name: Run the ci script inside the scripts folder
17-
run: sh scripts/run_ci.sh
17+
run: bash scripts/run_ci.sh
1818
shell: bash

scripts/run_ci.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#!/bin/bash
2-
# These are the same steps we are running in Travis CI
3-
4-
5-
find . -name "*.md" -not -path "./tests/*" | \
6-
xargs -I {} \
7-
python $(dirname "$0")/../tests/syntax_lint.py {} > /dev/null
8-
mdPassed=$?
9-
flake8 --max-line-length=100 . && echo "PEP8 Passed"
10-
pyPassed=$?
11-
if [ $pyPassed -eq 0 ] && [ $mdPassed -eq 0 ];then
12-
exit 0
13-
else
14-
exit 1
15-
fi
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.."
6+
7+
MD_FILES=$(find ${PROJECT_DIR} -name "*.md" -not -path "${PROJECT_DIR}/tests/*")
8+
9+
for file in ${MD_FILES[@]}; do
10+
python ${PROJECT_DIR}/tests/syntax_lint.py ${file} > /dev/null
11+
done
12+
13+
echo "- Syntax lint tests on MD files passed sucessfully"
14+
15+
flake8 --max-line-length=100 . && echo "- PEP8 Passed"

0 commit comments

Comments
 (0)