Skip to content

Commit b33975e

Browse files
committed
add simple workflows
1 parent 860f054 commit b33975e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/lint.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
28+
- name: Install Node dependencies
29+
run: npm install
30+
31+
- name: Install pre-commit
32+
run: pip install pre-commit
33+
34+
- name: Run pre-commit hooks
35+
run: pre-commit run --all-files
36+
37+
prettier:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
43+
- name: Set up Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: '20'
47+
48+
- name: Install Prettier
49+
run: npm install --save-dev prettier
50+
51+
- name: Run Prettier check
52+
run: npx prettier --check "**/*.{js,json,yaml,yml,md,html,css}"

0 commit comments

Comments
 (0)