-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.toml
130 lines (101 loc) · 3.31 KB
/
tasks.toml
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
# ref: https://mise.jdx.dev/tasks/
#:schema https://mise.jdx.dev/schema/mise-task.json
[dev]
depends = ["buni"]
run = ["bun run tsc --project tsconfig.src.json --watch"]
[build]
depends = ["buni"]
run = "bun run tsc --project tsconfig.src.json"
["test:unit"]
depends = ["buni"]
run = "bun test tests/unit"
["test:e2e"]
depends = ["buni"]
run = "bun run playwright test vrt format"
["test:e2e:snapshots"]
depends = ["buni"]
run = "bun run playwright test vrt --update-snapshots"
["test:e2e:fixtures:server"]
depends = ["build"]
run = ["bun install --save-text-lockfile", "bun run build", "bun run preview"]
dir = "tests/e2e/fixtures"
["test:e2e:fixtures:remove-symlinks"]
# remove before some checks to avoid symlink loops
run = "rm -rf node_modules/astro-better-image-service"
dir = "tests/e2e/fixtures"
hide = true
[commit]
depends = ["buni"]
run = ["git add .", "bun run git-cz"]
["commit:staged"]
depends = ["buni"]
run = "bun run git-cz"
[check]
depends = ["check:*"]
["check:biome"]
run = "biome {% if env.LINT is undefined %}check --write{% else %}ci{% endif %} --error-on-warnings"
["check:tsc"]
depends = ["buni"]
run = [
"bun run tsc --project tsconfig.src.json --noEmit {% if env.CI is defined %}--incremental false{% endif %}",
"bun run tsc --project tsconfig.base.json {% if env.CI is defined %}--incremental false{% endif %}",
]
["check:knip"]
depends = ["buni"]
run = "bun run knip-bun {% if env.CI is undefined %}--cache{% endif %}"
["check:jsonschema"]
run = "jschema-validator"
["check:actionlint"]
run = "actionlint -color"
# SC2312: check-extra-masked-returns
# pipefail is set by shell: bash in GitHub Actions but cannot be detected by shellcheck
# ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell
env = { "SHELLCHECK_OPTS" = "--enable=all --exclude=SC2312" }
["check:ghalint"]
wait_for = ["check:pinact"]
run = "ghalint run"
["check:pinact"]
run = "pinact run --verify"
depends_post = [
"{% if env.CI is defined %}util:nodiff{% else %}util:donothing{% endif %}",
]
["check:taplo"]
depends = ["test:e2e:fixtures:remove-symlinks"]
run = [
"taplo lint",
"taplo fmt {% if env.LINT is defined %}--check --diff{% endif %}",
]
["check:prettier"]
run = """
prettier {% if env.LINT is undefined %}--write{% else %}--check{% endif %} \
{% if env.CI is undefined %}--cache{% endif %} ."""
["check:markdownlint"]
depends = ["test:e2e:fixtures:remove-symlinks"]
run = "markdownlint-cli2 {% if env.LINT is undefined %}--fix{% endif %}"
["check:yamlfmt"]
run = "yamlfmt {% if env.LINT is defined %}-lint{% endif %} ."
["check:yamllint"]
run = "yamllint --strict ."
["check:cspell"]
run = "cspell {% if env.CI is undefined %}--cache{% endif %} \"**/*\""
["check:lychee"]
depends = ["test:e2e:fixtures:remove-symlinks"]
run = """
lychee {% if env.LINT is defined %}--verbose{% endif %} \
{% if env.CI is undefined %}--cache{% endif %} \"**/*\""""
["check:typos"]
run = "typos {% if env.LINT is undefined %}--write-changes{% endif %}"
["check:ignore-sync"]
run = "ignore-sync ."
depends_post = [
"{% if env.CI is defined %}util:nodiff{% else %}util:donothing{% endif %}",
]
["buni"]
run = "bun install --frozen-lockfile"
["util:nodiff"] # cspell:ignore nodiff
run = ["git add .", "git diff --staged --exit-code"]
hide = true
# cspell:ignore donothing
["util:donothing"]
run = ""
hide = true