mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
ci(lint): Use pre-commit
This commit is contained in:
parent
505eb90479
commit
de5538a40f
1 changed files with 4 additions and 6 deletions
|
@ -13,18 +13,16 @@ variables:
|
||||||
LOG_CONFIG: logging.test.conf
|
LOG_CONFIG: logging.test.conf
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
variables:
|
|
||||||
# Space-separated list of directories that should be linted.
|
|
||||||
REQUIRES_LINT: "aurweb test migrations"
|
|
||||||
stage: .pre
|
stage: .pre
|
||||||
before_script:
|
before_script:
|
||||||
- pacman -Sy --noconfirm --noprogressbar --cachedir .pkg-cache
|
- pacman -Sy --noconfirm --noprogressbar --cachedir .pkg-cache
|
||||||
archlinux-keyring
|
archlinux-keyring
|
||||||
- pacman -Syu --noconfirm --noprogressbar --cachedir .pkg-cache
|
- pacman -Syu --noconfirm --noprogressbar --cachedir .pkg-cache
|
||||||
python python-isort flake8
|
git python python-pre-commit
|
||||||
script:
|
script:
|
||||||
- bash -c 'flake8 --count $(echo "$REQUIRES_LINT" | xargs); exit $?'
|
# https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763
|
||||||
- bash -c 'isort --check-only $(echo "$REQUIRES_LINT" | xargs); exit $?'
|
- export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||||
|
- pre-commit run -a
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
|
|
Loading…
Add table
Reference in a new issue