Skip to content

Commit 59708a5

Browse files
committed
ci: add formatting workflow
1 parent 378bf84 commit 59708a5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/formatting.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format Code
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
fmt:
7+
runs-on: ubuntu-latest
8+
if: github.repository == 'ferus-web/ferus'
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Cache nimble
14+
id: cache-nimble
15+
uses: actions/cache@v4
16+
with:
17+
path: ~/.nimble
18+
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
19+
restore-keys: |
20+
${{ runner.os }}-nimble-
21+
22+
- uses: jiro4989/setup-nim-action@v2
23+
with:
24+
nim-version: '2.0.0' # 2.2.x cannot compile nph due to a regression
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Format the code
28+
run: nimble install nph
29+
run: nph --version
30+
run: nph .

0 commit comments

Comments
 (0)