-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
72 lines (62 loc) · 1.71 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
# https://taskfile.dev
version: "3"
tasks:
install:
desc: Installs the dependecies based on the poetry file
cmds:
- poetry install --no-root
lint:
desc: Runs formatting and linting
cmds:
- poetry run black --check professional_python_exercises_3_api
- |
poetry run flake8 professional_python_exercises_3_api \
--show-source \
--statistics \
--count
- poetry run pylint professional_python_exercises_3_api
build:
desc: Builds the puthon package
cmds:
- poetry build
test:
desc: Runs tests on the code
cmds:
- >
poetry run pytest
--cov=professional_python_exercises_3_api
--cov-report=html
sbom:
desc: Generate the Software Bill of Materials
cmds:
- |
# Make sure no file exists since cyclonedx-bom cannot overwrite
rm -f sbom.json
# Create the Software Bill of Materials as json
poetry run cyclonedx-bom \
--poetry \
--format json \
--output sbom.json
# Create the Software Bill of Materials as markdown
poetry run mdb generate \
--input sbom.json \
--output docs/sbom.md \
--template docs/templates/sbom.md.jinja
# Clean up
rm -f sbom.json
docs-serve:
desc: Serve the documentation locally
cmds:
- poetry run mkdocs serve
docs-publish:
desc: Publish the documentation to gh-pages
cmds:
- poetry run mkdocs gh-deploy --force
cli:
desc: Runs the cli. Use 'task cli -- ARG' to specify args.
cmds:
- poetry run githubcli {{.CLI_ARGS}}
api:
desc: Run the API server
cmds:
- poetry run githubcli api