Skip to content

Commit 9d56d4e

Browse files
committed
ci: Check if files are formatted
1 parent 0118b74 commit 9d56d4e

File tree

4 files changed

+67
-2
lines changed

4 files changed

+67
-2
lines changed

.github/workflows/CI.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,18 @@ jobs:
6161
uses: mlugg/setup-zig@v2.0.5
6262
with:
6363
version: "latest"
64-
- name: Check code formatted
64+
- name: Run formatter in check mode
6565
run: zig fmt --check .
66+
67+
prettier:
68+
name: Prettier
69+
runs-on: ubuntu-24.04
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v5
73+
- name: Setup Node.js environment
74+
uses: actions/setup-node@v5
75+
with:
76+
node-version: 22
77+
- name: Run formatter in check mode
78+
run: npx prettier -c "**.{md,yaml,yml}"

.github/workflows/actionlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v5
2626
with:
2727
persist-credentials: false
28-
- name: Check no lint warnings
28+
- name: Run linter
2929
uses: docker://rhysd/actionlint:latest
3030
with:
3131
args: -color -verbose

.github/workflows/just.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2025 Shun Sakai
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
name: just
6+
7+
on:
8+
pull_request:
9+
paths:
10+
- justfile
11+
push:
12+
paths:
13+
- justfile
14+
15+
jobs:
16+
just:
17+
name: just
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v5
22+
- name: Setup just
23+
uses: extractions/setup-just@v3
24+
- name: Run formatter in check mode
25+
run: just --fmt --check --unstable

.github/workflows/tombi.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: 2025 Shun Sakai
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
name: Tombi
6+
7+
on:
8+
pull_request:
9+
paths:
10+
- "**.toml"
11+
push:
12+
paths:
13+
- "**.toml"
14+
15+
jobs:
16+
tombi:
17+
name: Tombi
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v5
22+
- name: Setup Tombi
23+
uses: tombi-toml/setup-tombi@v1.0.0
24+
- name: Run formatter in check mode
25+
run: tombi format --check
26+
- name: Run linter
27+
run: tombi lint

0 commit comments

Comments
 (0)