-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
33 lines (29 loc) · 973 Bytes
/
.gitlab-ci.yml
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
32
33
image: python:3.10-slim
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIPENV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pipenv"
ANSIBLE_CONFIG: "ansible_test.cfg"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache
before_script:
- apt-get update -qq && apt-get install -y -qq git
- pip3 install pipenv --ignore-installed distlib
- python3 --version
- pipenv --version
lint:
stage: test
script:
- pipenv verify
- pipenv sync
- pipenv requirements
- pipenv check --ignore 42923 # Ignore: https://bugzilla.redhat.com/show_bug.cgi?id=1956464
- pipenv run ansible-galaxy install -r requirements.yml
- scripts/lint.sh