-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
92 lines (81 loc) · 2.01 KB
/
Taskfile.yml
File metadata and controls
92 lines (81 loc) · 2.01 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
version: "3"
dotenv: ['.env', '{{.ENV}}/.env', '{{.HOME}}/.env']
includes:
dbt:
taskfile: .task/dbt.yml
tasks:
install-uv:
cmds:
- brew install uv
silent: true
internal: true
import_command: false
status:
- brew ls --versions uv
install-bearer:
cmds:
- brew install bearer/tap/bearer
silent: true
internal: true
import_command: false
status:
- brew ls --versions bearer
install-gh:
desc: Install gh
cmds:
- brew install gh
- gh auth login
silent: true
internal: true
import_command: false
status:
- brew ls --versions gh
setup-env:
desc: Setup the environment
import_command: false
cmds:
- task: install-uv
- task: install-bearer
- task: install-gh
- uv python install 3.11
- uv venv
- zsh -c "source ./.venv/bin/activate && uv sync"
- zsh -c "source ./.venv/bin/activate && uv pip install -e ."
- zsh -c "source ./.venv/bin/activate && pre-commit install --hook-type pre-commit --hook-type pre-push"
- zsh -c "source ./.venv/bin/activate && pre-commit autoupdate"
- task: dbt:get-latest-manifest
- "echo Checking Environment Variables"
- task: view-env
test-setup:
desc: Setup the environment for testing
cmds:
- task: validate-env
- task: dbt:debug
- task: dbt:get-latest-manifest
validate:
desc: Validate the project
cmds:
- set -o allexport
- source .env
- set +o allexport
- pre-commit run --all-files
cli:
desc: Run the CLI
import_command: false
silent: false
cmds:
- |
export PYTHONPATH=.
python cli/dbt_cli.py start
check-env:
desc: "Check if an environment variable exists"
import_command: false
silent: true
cmds:
- |
if [ -z "${{.VAR_NAME}}" ]; then
echo "❌ ERROR: {{.VAR_NAME}} is missing!"
exit 1
else
echo "{{.VAR_NAME}} = ${{.VAR_NAME}}"
fi