Skip to content

Commit 9f9af2d

Browse files
authored
ci: add lint workflow (#1)
1 parent 9e56eca commit 9f9af2d

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: CI
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
lint:
20+
name: Lint
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 15
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
30+
31+
- name: Install Biome
32+
run: |
33+
tag="%40biomejs/biome%402.3.2"
34+
url="https://github.com/biomejs/biome/releases/download"
35+
curl -fsSL "${url}/${tag}/biome-linux-x64" -o biome
36+
chmod +x biome
37+
sudo mv biome /usr/local/bin/
38+
39+
- name: Install just
40+
run: |
41+
url="https://github.com/casey/just/releases/download"
42+
url="${url}/1.46.0/just-1.46.0-x86_64-unknown-linux-musl.tar.gz"
43+
curl -fsSL "${url}" | tar xz -C /usr/local/bin just
44+
45+
- name: Install rumdl
46+
run: |
47+
url="https://github.com/rvben/rumdl/releases/download"
48+
url="${url}/v0.1.26/rumdl-v0.1.26-x86_64-unknown-linux-gnu.tar.gz"
49+
curl -fsSL "${url}" | tar xz
50+
sudo mv rumdl /usr/local/bin/
51+
52+
- name: Install linting tools
53+
run: |
54+
uv tool install yamllint
55+
uv tool install codespell
56+
57+
- name: Cache Vale styles
58+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
59+
with:
60+
path: .vale
61+
key: vale-styles-${{ hashFiles('.vale.ini') }}
62+
restore-keys: |
63+
vale-styles-
64+
65+
- name: Install and sync Vale
66+
run: |
67+
uv tool install vale
68+
vale sync
69+
70+
- name: Run linters
71+
run: just lint
72+
73+
- name: Lint GitHub Actions workflows
74+
uses: reviewdog/action-actionlint@4b9ef3f43a0b9162e3c83c1a08d1cc8d4235164b # v1.70.0

0 commit comments

Comments
 (0)