forked from AliOsm/pastehtml.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
64 lines (48 loc) · 1.27 KB
/
Copy pathmise.toml
File metadata and controls
64 lines (48 loc) · 1.27 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
[tools]
node = "25.8.0"
ruby = "3.4.7"
yarn = "4.12.0"
[tasks."docker:start"]
description = "Start Docker services using docker-compose"
run = "docker compose -f dev-docker-compose.yml up -d"
[tasks."docker:stop"]
description = "Stop Docker services using docker-compose"
run = "docker compose -f dev-docker-compose.yml down"
[tasks."deps"]
description = "Install dependencies"
run = "mise run deps:ruby && mise run deps:js"
[tasks."deps:ruby"]
description = "Install Ruby gems"
run = "bundle install"
[tasks."deps:js"]
description = "Install JavaScript dependencies"
run = "yarn install"
[tasks."db:prepare"]
description = "Prepare database"
run = "bundle exec rails db:prepare"
[tasks.lint]
description = "Run Ruby and security lint"
run = '''
status=0
bundle exec rubocop || { echo "❌ Ruby lint failed"; status=1; }
bundle exec brakeman --quiet --no-pager || { echo "❌ Security lint failed"; status=1; }
exit "$status"
'''
[tasks.test]
description = "Run unit tests"
run = "CI=1 bundle exec rails test"
[tasks.dev]
description = "Start development environment"
run = '''
mise run docker:start
mise run deps
mise run db:prepare
cleanup() {
mise docker:stop
exit 0
}
# Set up trap to call cleanup on SIGINT (Ctrl+C) and SIGTERM
trap cleanup SIGINT SIGTERM
./bin/dev
cleanup
'''