Skip to content

Commit fa764f8

Browse files
committed
add ruff to CI
1 parent f8236d6 commit fa764f8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/checks.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Runs linting on the codebase with Ruff
2+
name: Ruff linting
3+
4+
defaults:
5+
run:
6+
shell: bash
7+
8+
# Runs on the following conditions:
9+
# - Any push to a branch linked to a pull request
10+
# -> if the pushed commit changes files within the codebase (in pyhdtoolkit/ or tests/ directories)
11+
# -> or if the pushed commit changes the pyproject.toml configuration file
12+
on:
13+
pull_request:
14+
paths:
15+
- 'pyhdtoolkit/**'
16+
- 'tests/**'
17+
- 'pyproject.toml'
18+
19+
jobs:
20+
linter:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
# This runs ruff check by default, our pyproject.toml has the config
27+
- uses: astral-sh/ruff-action@v3
28+
with:
29+
version: "latest"
30+
src: "pyhdtoolkit/"

0 commit comments

Comments
 (0)