ci: Run eslint via tox
With GitHub Actions, we can now easily install tox *and* eslint in the same environment.
This commit is contained in:
parent
491fc4a35a
commit
75b4a069cb
|
|
@ -24,25 +24,15 @@ pip_install() {
|
|||
python3 -m pip install "$@"
|
||||
}
|
||||
|
||||
if [[ -n $DOCKER ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
testenv=$1
|
||||
|
||||
case $testenv in
|
||||
eslint)
|
||||
npm install -g eslint
|
||||
;;
|
||||
shellcheck)
|
||||
;;
|
||||
*)
|
||||
pip_install -U pip
|
||||
pip_install -U -r misc/requirements/requirements-tox.txt
|
||||
if [[ $testenv == docs ]]; then
|
||||
sudo apt install asciidoc
|
||||
elif [[ $testenv == *-cov ]]; then
|
||||
pip_install -U -r misc/requirements/requirements-codecov.txt
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
[[ -n $DOCKER || $testenv == shellcheck ]] && exit 0
|
||||
|
||||
[[ $testenv == eslint ]] && npm install -g eslint
|
||||
|
||||
pip_install -U pip
|
||||
pip_install -U -r misc/requirements/requirements-tox.txt
|
||||
|
||||
[[ $testenv == docs ]] && sudo apt install asciidoc
|
||||
[[ $testenv == *-cov ]] && pip_install -U -r misc/requirements/requirements-codecov.txt
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@ if [[ -n $DOCKER ]]; then
|
|||
-e "DOCKER=$DOCKER" \
|
||||
-e "CI=$CI" \
|
||||
"qutebrowser/ci:$DOCKER"
|
||||
elif [[ $testenv == eslint ]]; then
|
||||
# Can't run this via tox as we can't easily install tox in the javascript
|
||||
# travis env
|
||||
cd qutebrowser/javascript || exit 1
|
||||
eslint --color --report-unused-disable-directives .
|
||||
elif [[ $testenv == shellcheck ]]; then
|
||||
script_list=$(mktemp)
|
||||
find scripts/dev/ -name '*.sh' > "$script_list"
|
||||
|
|
|
|||
Loading…
Reference in New Issue