-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
49 lines (39 loc) · 983 Bytes
/
Taskfile.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3'
vars:
PACKAGE_SRC_DIR: flowctl
# Docker specific variables
DOCKER_BUILDKIT: 1
IMAGE_REGISTRY: ghcr.io
IMAGE_REPOSITORY: emergentmethods/flowctl
IMAGE_NAME: "{{.IMAGE_REGISTRY}}/{{.IMAGE_REPOSITORY}}"
IMAGE_TAG: local
DOCKER_BUILD_ARGS: ""
PYTHON_VERSION: 3.11
tasks:
# ---------------------
# Linting
lint:
cmds:
- flake8 {{.PACKAGE_SRC_DIR}}
# Run unit tests
unit-tests:
cmds:
- coverage run -m pytest --junitxml=report.xml
- coverage report
- coverage xml
- coverage html -d coverage-report
# Build the documentation
build-docs:
cmds:
- flowctl dev docs cli.md --style table
# ---------------------
# Build the base image
build-docker:
requires:
vars: [
IMAGE_NAME,
IMAGE_TAG,
PYTHON_VERSION,
]
cmds:
- docker build {{.DOCKER_BUILD_ARGS}} --build-arg PYTHON_VERSION={{.PYTHON_VERSION}} -t {{.IMAGE_NAME}}:{{.IMAGE_TAG}} .