forked from charbonats/nats-connect-opts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
73 lines (71 loc) · 1.89 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '3'
env:
NATS_SERVER_VERSION: v2.10.11
tasks:
install-nats-server:
status:
- ls -A $HOME/nats-server
cmds:
- mkdir -p $HOME/nats-server
- cd $HOME/nats-server
- >
wget
https://github.com/nats-io/nats-server/releases/download/$NATS_SERVER_VERSION/nats-server-$NATS_SERVER_VERSION-{{OS}}-{{ARCH}}.zip
-O nats-server.zip
- unzip nats-server.zip
- cp nats-server-*/nats-server $HOME/nats-server/nats-server
- rm -rf nats-server-*
- rm nats-server.zip
install:
desc: "Install the package in editable mode."
cmds:
- python3 -m venv .venv
- .venv/bin/python -m pip install -U pip setuptools wheel
- .venv/bin/python -m pip install -e .[docs,dev,build]
clean:
desc: "Clean the build files"
cmds:
- rm -rf build/ dist/ src/*.egg-info/ .pytest_cache/ .coverage
- rm -rf docs/coverage/
build:
desc: "Build the package"
cmds:
- python -m build
build:docs:
desc: "Build the documentation"
cmds:
- mkdocs build
format:
desc: "Format the code using black and isort"
cmds:
- black src/ tests/ examples/
- isort src/ tests/ examples/
format:check:
desc: "Check the code formatting using black and isort"
cmds:
- black --check src/ tests/ examples/
- isort --check src/ tests/ examples/
static:check:
desc: "Run static analysis using flake8 and pyright"
cmds:
- flake8 src/ tests/ examples/
- pyright src/ tests/ examples/
test:
desc: "Run the tests using pytest"
cmds:
- pytest --cov src --cov-report html:docs/coverage -x
docs:
desc: "Build the documentation"
cmds:
- mkdocs serve
deps:
- test
ci:
desc: "Run the CI pipeline"
cmds:
- task format:check
- task static:check
- task test
deps:
- install
- install-nats-server