You've already forked devops-exercises
mirror of
https://github.com/bregman-arie/devops-exercises.git
synced 2025-07-12 23:50:28 +02:00
Update/run ci script (#352)
* New questions and spell check (#181) Added new questions related with KVM, Libvirt and DNF * Improve run_ci script readability * Change shell in workflow
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
# These are the same steps we are running in Travis CI
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
find . -name "*.md" -not -path "./tests/*" | \
|
||||
xargs -I {} \
|
||||
python $(dirname "$0")/../tests/syntax_lint.py {} > /dev/null
|
||||
mdPassed=$?
|
||||
flake8 --max-line-length=100 . && echo "PEP8 Passed"
|
||||
pyPassed=$?
|
||||
if [ $pyPassed -eq 0 ] && [ $mdPassed -eq 0 ];then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.."
|
||||
|
||||
MD_FILES=$(find ${PROJECT_DIR} -name "*.md" -not -path "${PROJECT_DIR}/tests/*")
|
||||
|
||||
for file in ${MD_FILES[@]}; do
|
||||
python ${PROJECT_DIR}/tests/syntax_lint.py ${file} > /dev/null
|
||||
done
|
||||
|
||||
echo "- Syntax lint tests on MD files passed sucessfully"
|
||||
|
||||
flake8 --max-line-length=100 . && echo "- PEP8 Passed"
|
Reference in New Issue
Block a user