Newer
Older
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
stages:
- lint
- test
pre-commit:
stage: lint
image: adarnimrod/ci-images:pre-commit
variables: &variables
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
PIPENV_VENV_IN_PROJECT: "1"
LANG: C.UTF-8
before_script:
- apt-get update
- apt-get install -y libdbus-1-dev
- pipenv install --dev && rm pyproject.toml
script:
- pipenv run lint
cache: &cache
key: "$CI_JOB_NAME"
paths:
- .cache/
- .venv/
test:
stage: test
image: $project:$version-slim
before_script:
- apt-get update
- >-
apt-get install -y
bats
build-essential
git
libdbus-1-dev
libffi-dev
libglib2.0-dev
libssl-dev
- |-
if [ "$project" = 'pypy' ]
then
ln -sf /opt/pypy/bin/pypy "/usr/local/bin/python$version"
fi
- pip install pipenv
- pipenv install --dev --python=$version
script:
- pipenv run bats
- pipenv run check
- pipenv run doctest
- pipenv run build
variables:
<<: *variables
PIPENV_SKIP_LOCK: 1
cache: *cache
parallel:
matrix:
- project: python
version:
- "2.7"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- project: pypy
version:
- "2.7"
- "3.6"
- "3.7"