-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTaskfile.yml
More file actions
134 lines (112 loc) · 2.74 KB
/
Taskfile.yml
File metadata and controls
134 lines (112 loc) · 2.74 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3'
includes:
generate: ./tasks.d/generate.yaml
hugo: ./tasks.d/hugo.yaml
python: ./tasks.d/python.yaml
env:
MAKEFLAGS: '--no-print-directory'
TASK_TEMP_DIR: .cache/task
vars:
TOOL_DIR: .tool
LYCHEE: '{{ .TOOL_DIR }}/lychee'
tasks:
## Bootstrap tasks #################################
binny:
internal: true
generates:
- '{{ .TOOL_DIR }}/binny'
status:
- 'test -f {{ .TOOL_DIR }}/binny'
cmd: 'curl -sSfL https://get.anchore.io/binny | sh -s -- -b .tool'
silent: true
tools:
desc: Install all tools needed for CI and local development
deps: [binny]
aliases:
- bootstrap
generates:
- '.binny.yaml'
- '{{ .TOOL_DIR }}/*'
status:
- '{{ .TOOL_DIR }}/binny check -v'
cmd: '{{ .TOOL_DIR }}/binny install -v'
silent: true
update-tools:
desc: Update pinned versions of all tools to their latest available versions
deps: [binny]
generates:
- '.binny.yaml'
- '{{ .TOOL_DIR }}/*'
cmd: '{{ .TOOL_DIR }}/binny update -v'
silent: true
list-tools:
desc: List all tools needed for CI and local development
deps: [binny]
cmd: '{{ .TOOL_DIR }}/binny list'
silent: true
list-tool-updates:
desc: List all tools that are not up to date relative to the binny config
deps: [binny]
cmd: '{{ .TOOL_DIR }}/binny list --updates'
silent: true
# high level tasks
install:
desc: Install all development dependencies
deps: [tools]
cmds:
- task: hugo:install
- task: python:install
dev:
desc: Start development environment with live reload
deps:
- install
cmds:
- task: hugo:dev
default:
desc: Default task (validate)
cmds:
- task: validate
lint:
desc: Run all linters
cmds:
- task: python:lint
- task: hugo:lint
lint-fix:
desc: Auto-fix linting issues where possible
deps:
- format
cmds:
- task: python:lint-fix
- task: hugo:lint-fix
format:
desc: Format all code
cmds:
- task: python:format
test:
desc: Run all tests
cmds:
- task: unit
- task: e2e
unit:
desc: Run all unit tests
cmds:
- task: python:unit
e2e:
desc: Run all end-to-end tests
cmds:
- npm test
validate:
desc: Run all validation tasks
cmds:
# run linters for high and low level concerns across stacks
- uv run pre-commit run -a --hook-stage push
# per-stack tests
- task: python:test
- task: hugo:test
# note: this target name cannot be changed, as it is used by cloudflare pages to build and deploy the site
release:
desc: Build site for production release
deps: [tools]
cmds:
- npm install
- npm run build