-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile.yml
102 lines (95 loc) · 3.09 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3'
dotenv: ['.env']
tasks:
publish:tag:
vars:
PROJ_VERSION:
sh: poetry version | awk '{print $2}'
prompt: "Before we build, is the version {{.PROJ_VERSION}} number up to date?"
desc: tags the current commit
cmds:
- git tag -s -a v{{.PROJ_VERSION}} -m "v{{.PROJ_VERSION}}"
- git push origin v{{.PROJ_VERSION}}
build:image:
prompt: Have you made sure the version number is up to date?
desc: builds publishable python package
cmds:
- poetry build
test:
desc: runs tests inside the virtualenv
summary:
runs all the tests inside the virtualenv, optionally
provide the name of the test as an argument to run a single test
this does not run coverage or provide tap output
cmds:
- poetry run coverage run -m pytest -s tests/{{.CLI_ARGS}}
test:tap:
desc: runs tests with tap output
summary:
runs all the tests inside the virtualenv, optionally
provide the name of the test as an argument to run a single test
cmds:
- poetry run coverage run -m pytest -s --tap tests/{{.CLI_ARGS}}
test:list:
desc: lists the available tests
summary:
runs collect only on pytest to list the tests available
cmds:
- poetry run pytest --co
test:coverreport:
desc: runs coverage inside the server container
cmds:
- poetry run coverage report -m
lint:
desc: runs the linter
cmds:
- poetry run flake8 gallagher tests
black:
desc: runs black on the codebase
cmds:
- poetry run black gallagher tests
dev:textual:
desc: runs the textual cli
cmds:
- poetry run textual -- {{.CLI_ARGS}}
dev:tui:
desc: runs text gallagher console in dev mode
cmds:
- poetry run textual run --dev gallagher.tui
dev:py:
desc: runs python in the poetry shell
cmds:
- poetry run python -- {{.CLI_ARGS}}
dev:docs:
desc: run the mkdocs server with appropriate flags
cmds:
- cd docs && mkdocs serve --open -a localhost:8001
debug:get:
desc: use httpie to get payload from CC
summary: |
runs a httpie get against the gallagher aus gateway
appends the required headers, assumes the environment
variables are set.
you must pass in the partial url (past /api),
along with any parameters.
by no suffix is provided CC returns a list of hateoas
compliant endpoints.
cmds:
- |
http get \
https://commandcentre-api-au.security.gallagher.cloud/api/{{.CLI_ARGS}} \
"Authorization: GGL-API-KEY $GACC_API_KEY"
debug:delete:
prompt: "Are you sure you want to delete {{.CLI_ARGS}}??"
desc: use httpie to delete resource from CC
summary: |
runs a httpie get against the gallagher aus gateway
appends the required headers, assumes the environment
variables are set.
you must pass in the partial url (past /api),
along with any parameters.
cmds:
- |
http delete \
https://commandcentre-api-au.security.gallagher.cloud/api/{{.CLI_ARGS}} \
"Authorization: GGL-API-KEY $GACC_API_KEY"