-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
32 lines (29 loc) · 926 Bytes
/
tox.ini
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
[tox]
requires =
tox>=4
env_list = lint, integration
[testenv]
setenv =
version=3.3.2
repo=https://github.com/canonical/kafka-k8s-operator.git
base-name=ghcr.io/canonical/charmed-kafka
risk=edge
[testenv:lint]
description = run linters
skip_install = true
deps =
yamllint
commands =
yamllint --no-warnings rockcraft.yaml
[testenv:integration]
description = run operator integration tests
skip_install = true
allowlist_externals =
tox
microk8s
bash
commands =
bash -ec 'if ! [ -f charmed-kafka_$(yq .version rockcraft.yaml)_amd64.rock ]; then rockcraft pack; fi' {posargs}
microk8s ctr image import charmed-kafka_$(yq .version rockcraft.yaml)_amd64.rock --base-name {env:base-name}:$(yq .version rockcraft.yaml)-$(yq .base rockcraft.yaml | cut -d : -f 2)_{env:risk}
bash -ec 'if ! [ -d operator ]; then git clone {env:repo} operator ; fi' {posargs}
tox --workdir operator -c operator -e integration