forked from fepitre/qubes-continuous-integration
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcommon.yml
More file actions
31 lines (30 loc) · 973 Bytes
/
Copy pathcommon.yml
File metadata and controls
31 lines (30 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.lint:
stage: checks
image: fedora:latest
tags:
- docker
variables:
BLACK_ARGS: -l80 -v --diff --color --check
before_script:
- if [ "$EUID" -ne 0 ]; then DNF="sudo dnf"; fi
- ${DNF:-dnf} install -y python3-black python3-pylint python3-pip
- if [ -n "$PYREQUIREMENTS" ]; then pip3 install --quiet -r "$PYREQUIREMENTS"; fi
script:
- black $BLACK_ARGS --extend-exclude artifacts/ ${DIR:-.}
- if [ -e .pylintrc ] && [ "${SKIP_PYLINT}" != "1" ]; then pylint-3 $PYLINT_ARGS ${DIR:-.}; fi
.shellcheck:
stage: checks
image: fedora:latest
tags:
- docker
variables:
SHELLCHECK_ARGS: -x -e SC1117
before_script:
- if [ "$EUID" -ne 0 ]; then DNF="sudo dnf"; fi
- ${DNF:-dnf} install -y ShellCheck git file
script:
- >-
git ls-files -z |
xargs -0 file --mime-type |
awk -F': *' '$2 == "text/x-shellscript" && $1 !~ /\.(j2|tpl|jinja2?)$/ {print $1}' |
xargs -r shellcheck $SHELLCHECK_ARGS