Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
101 lines (89 loc) · 2.94 KB
/
Copy pathTaskfile.yml
File metadata and controls
101 lines (89 loc) · 2.94 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
version: '3'
includes:
rust:
taskfile: ./src-tauri/Taskfile.yml
dir: ./src-tauri
tasks:
dev:
desc: Run dev-web and dev-tauri together.
deps: [dev-web, dev-tauri]
dev-tauri:
desc: Run only the Tauri side with the local dev database and debug logging.
dir: src-tauri
env:
DATABASE_URL: sqlite:dev.db
DEFGUARD_CLIENT_DEV: '1'
DEFGUARD_CLIENT_LOG_LEVEL: debug
cmd: cargo tauri dev
dev-welcome:
desc: Run only the Tauri side like dev-tauri, forcing the welcome window to open.
dir: src-tauri
env:
DATABASE_URL: sqlite:dev.db
DEFGUARD_CLIENT_DEV: '1'
DEFGUARD_CLIENT_LOG_LEVEL: debug
DEFGUARD_CLIENT_WELCOME_FORCE: '1'
cmd: cargo tauri dev
dev-web:
desc: Run only the web frontend dev server.
dir: new-ui
cmd: pnpm dev
lint:
desc: Lint new-ui and the Rust workspace.
cmds:
- task: lint-web
- task: rust:lint
lint-web:
desc: Lint new-ui with biome, prettier, stylelint and tsc.
dir: new-ui
cmd: pnpm lint
build:
desc: Build the frontend and the Tauri bundle (unsigned MSI on Windows).
cmds:
- cmd: pnpm build
dir: new-ui
- cmd: cargo tauri build --config src-tauri/tauri.local.conf.json
platforms: [windows]
- cmd: cargo tauri build
platforms: [linux, darwin]
e2e-build:
desc: Build the Linux client and install both frontend dependency sets.
platforms: [linux]
cmds:
- cmd: pnpm install --frozen-lockfile && pnpm build
dir: new-ui
- cmd: pnpm install --frozen-lockfile
dir: e2e
- cargo tauri build
e2e-provision:
desc: Provision the configured Core deployment. It must already be running.
dir: e2e
preconditions:
- sh: test -f .env
msg: Missing e2e/.env, copy e2e/.env.example and fill it locally.
cmd: pnpm provision
e2e-test:
desc: Run the Linux WebDriver suite. Core, Edge, gateway and defguard-service are external prerequisites.
platforms: [linux]
dir: e2e
preconditions:
- sh: test -f .env
msg: Missing e2e/.env, copy e2e/.env.example and fill it locally.
- sh: test -S /var/run/defguard.socket
msg: defguard-service is not running at /var/run/defguard.socket.
- sh: test -x "${TAURI_DRIVER:-$HOME/.cargo/bin/tauri-driver}"
msg: tauri-driver is missing, set TAURI_DRIVER to its location.
- sh: command -v WebKitWebDriver
msg: WebKitWebDriver is missing, enter nix develop.
- sh: command -v xvfb-run
msg: xvfb-run is missing, enter nix develop.
- sh: command -v dbus-run-session
msg: dbus-run-session is missing, enter nix develop.
cmd: NATIVE_DRIVER="${NATIVE_DRIVER:-$(command -v WebKitWebDriver)}" dbus-run-session -- xvfb-run -a pnpm test
e2e:
desc: Build, provision and run the Linux E2E suite.
platforms: [linux]
cmds:
- task: e2e-build
- task: e2e-provision
- task: e2e-test