File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Ruff Formatter Check
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, synchronize, reopened, edited]
6
+
7
+ jobs :
8
+ ruff :
9
+ runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ python-version : ["3.9.13"]
13
+ steps :
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Set up Python ${{ matrix.python-version }}
18
+ uses : actions/setup-python@v5
19
+ with :
20
+ python-version : ${{ matrix.python-version }}
21
+
22
+ - name : Set up caching for Ruff virtual environment
23
+ id : cache-ruff
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : .venv
27
+ key : v2-pypi-py-ruff-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
28
+ restore-keys : |
29
+ v2-pypi-py-ruff-${{ matrix.python-version }}-
30
+
31
+ - name : Set up Ruff virtual environment if cache is missed
32
+ if : steps.cache-ruff.outputs.cache-hit != 'true'
33
+ run : |
34
+ python -m venv .venv
35
+ .venv/bin/python -m pip install ruff==0.11.5
36
+
37
+ - name : Ruff format check
38
+ run : |
39
+ .venv/bin/ruff format --diff bittensor_cli
40
+ .venv/bin/ruff format --diff tests
You can’t perform that action at this time.
0 commit comments