-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
94 lines (78 loc) · 3.98 KB
/
Copy pathTaskfile.yml
File metadata and controls
94 lines (78 loc) · 3.98 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
# https://taskfile.dev
version: '3'
vars:
VENV_COPIER: .venv/bin/copier
tasks:
# ── Setup ──────────────────────────────────────────────────────────────────
setup:
desc: "Full onboarding: install copier + download RCC + install git hooks (run once after cloning)"
cmds:
- task: install-copier
- task: download-rcc
- task: install-hooks
install-hooks:
desc: Register .githooks/ as the git hooks directory
cmds:
- git config core.hooksPath .githooks
status:
- test "$(git config core.hooksPath)" = ".githooks"
install-copier:
desc: Install copier into .venv (required for generate tasks)
cmds:
- pip install copier
status:
- test -x {{.VENV_COPIER}}
download-rcc:
desc: Download RCC binary into _dev/.rcc/ (not committed to git)
platforms: [linux, darwin]
cmds:
- bash _dev/scripts/download-rcc.sh
download-rcc-windows:
desc: Download RCC binary into _dev\.rcc\ (Windows)
platforms: [windows]
cmds:
- powershell -ExecutionPolicy Bypass -File _dev\scripts\download-rcc.ps1
# ── Generate ───────────────────────────────────────────────────────────────
generate:
desc: "Regenerate all (or one) example from its Copier template. Usage: task generate / task generate EXAMPLE=cryptolibrary"
platforms: [linux, darwin]
cmds:
- _dev/scripts/generate-all.sh {{.EXAMPLE}}
generate-windows:
desc: "Regenerate all (or one) example (Windows). Usage: task generate-windows / task generate-windows EXAMPLE=cryptolibrary"
platforms: [windows]
cmds:
- powershell -ExecutionPolicy Bypass -File _dev\scripts\generate-all.ps1 {{if .EXAMPLE}}-Filter {{.EXAMPLE}}{{end}}
# ── Test ───────────────────────────────────────────────────────────────────
test:
desc: "Run a Robot Framework example locally via RCC. Usage: task test EXAMPLE=cryptolibrary"
platforms: [linux, darwin]
vars:
EXAMPLE: '{{.EXAMPLE | default "cryptolibrary"}}'
RCC: _dev/.rcc/rcc
RMKS_ENVIRONMENT:
sh: grep '^RMKS_ENVIRONMENT=' examples/{{.EXAMPLE}}/.env | cut -d= -f2 | tr -d '[:space:]'
cmds:
- '{{.RCC}} holotree vars --space {{.RMKS_ENVIRONMENT}} --robot examples/{{.EXAMPLE}}/robot.yaml'
- '{{.RCC}} task script --space {{.RMKS_ENVIRONMENT}} --robot examples/{{.EXAMPLE}}/robot.yaml -- robot .'
test-windows:
desc: "Run a Robot Framework example locally via RCC (Windows). Usage: task test-windows EXAMPLE=cryptolibrary"
platforms: [windows]
vars:
EXAMPLE: '{{.EXAMPLE | default "cryptolibrary"}}'
RMKS_ENVIRONMENT:
sh: grep '^RMKS_ENVIRONMENT=' examples/{{.EXAMPLE}}/.env | cut -d= -f2 | tr -d '[:space:]'
cmds:
- '_dev\.rcc\rcc.exe holotree vars --space {{.RMKS_ENVIRONMENT}} --robot examples\{{.EXAMPLE}}\robot.yaml'
- '_dev\.rcc\rcc.exe task script --space {{.RMKS_ENVIRONMENT}} --robot examples\{{.EXAMPLE}}\robot.yaml -- robot .'
# ── Shell ──────────────────────────────────────────────────────────────────
shell:
desc: "Open an interactive RCC shell inside an example's environment. Usage: task shell EXAMPLE=cryptolibrary"
platforms: [linux, darwin]
vars:
EXAMPLE: '{{.EXAMPLE | default "cryptolibrary"}}'
RCC: _dev/.rcc/rcc
RMKS_ENVIRONMENT:
sh: grep '^RMKS_ENVIRONMENT=' examples/{{.EXAMPLE}}/.env | cut -d= -f2 | tr -d '[:space:]'
cmds:
- '{{.RCC}} task shell --space {{.RMKS_ENVIRONMENT}} --robot examples/{{.EXAMPLE}}/robot.yaml'