-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (61 loc) · 1.65 KB
/
linting.yaml
File metadata and controls
66 lines (61 loc) · 1.65 KB
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
---
name: Linting
# yamllint disable-line rule:truthy
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
DEFAULT_PYTHON: "3.13"
jobs:
lint:
name: Prek hooks
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v6.0.2
- name: 🏗 Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: 🏗 Install Python dependencies
run: uv sync --dev
- name: 🚀 Run all prek hooks
env:
SKIP: no-commit-to-branch
run: uv run prek run --all-files
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v6.0.2
- name: 🏗 Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: 🏗 Install Python dependencies
run: uv sync --dev
- name: 🏗 Set up Node.js
uses: actions/setup-node@v6.3.0
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: 🏗 Install NPM dependencies
run: npm install
- name: 🚀 Run prettier
run: uv run prek run prettier --all-files