Skip to content

Commit 50fb3f2

Browse files
authored
ci: add lint workflow (#1)
1 parent 273e958 commit 50fb3f2

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
npm install --global @biomejs/biome@2.3.2
34+
35+
- name: Install just
36+
run: |
37+
curl --proto '=https' --tlsv1.2 -sSf \
38+
https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
39+
40+
- name: Install rumdl
41+
run: |
42+
RUMDL_VERSION=v0.1.26
43+
RUMDL_BASE=https://github.com/rvben/rumdl/releases/download
44+
curl -fsSL "${RUMDL_BASE}/${RUMDL_VERSION}/rumdl-${RUMDL_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
45+
| tar xz
46+
sudo mv rumdl /usr/local/bin/
47+
48+
- name: Install linting tools
49+
run: |
50+
uv tool install yamllint
51+
uv tool install codespell
52+
53+
- name: Cache Vale styles
54+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
55+
with:
56+
path: .vale
57+
key: vale-styles-${{ hashFiles('.vale.ini') }}
58+
restore-keys: |
59+
vale-styles-
60+
61+
- name: Install and sync Vale
62+
run: |
63+
uv tool install vale
64+
vale sync
65+
66+
- name: Run linters
67+
run: just lint
68+
69+
- name: Lint GitHub Actions workflows
70+
run: |
71+
bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
72+
./actionlint -color

0 commit comments

Comments
 (0)