Skip to content

Commit 6d69cc5

Browse files
committed
Add lint step to CI workflow
1 parent a1a5605 commit 6d69cc5

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ on: # yamllint disable-line rule:truthy
3535

3636
jobs:
3737

38+
lint:
39+
# if: ${{ github.event_name == 'pull_request' }}
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/setup-python@v5
43+
- run: pipx run tox
44+
3845
mpich-43:
3946
if: ${{ github.event_name == 'pull_request' || inputs.mpich }}
4047
uses: ./.github/workflows/cd-wheel.yml
@@ -93,8 +100,8 @@ jobs:
93100

94101
wheelhouse:
95102
if: >-
96-
github.event_name == 'pull_request'
97-
|| inputs.mpich || inputs.openmpi
103+
(always() && !failure() && !cancelled())
104+
&& !inputs || inputs.mpich || inputs.openmpi
98105
runs-on: ubuntu-latest
99106
needs:
100107
- mpich-43

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ build:
55
./wheel-test.sh dist
66

77
lint:
8-
codespell *.sh */*.py
8+
codespell
9+
ruff check -qn
10+
ruff format -qn --diff
911
shellcheck *.sh
10-
ruff check -qn */*.py
1112
yamllint .github/
1213

1314
clean:

patches/auditwheel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
aw_walk = auditwheel.tools.walk
99

10+
1011
def walk(topdir):
1112
topdir = pathlib.Path(topdir).resolve(strict=True)
1213
for dirpath, dirnames, filenames in aw_walk(topdir):
13-
if (
14-
dirpath.suffix == ".dist-info"
15-
and dirpath.parent == topdir
16-
):
14+
if dirpath.suffix == ".dist-info" and dirpath.parent == topdir:
1715
# list any files in dist-info subdirs first
1816
# for example, dist-info/licenses/LICENSE*
1917
subfiles = []
@@ -30,6 +28,7 @@ def walk(topdir):
3028
filenames.append("RECORD")
3129
yield dirpath, dirnames, filenames
3230

31+
3332
auditwheel.tools.walk = walk
3433

3534
if "repair" in sys.argv:

tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[testenv]
2+
deps =
3+
codespell
4+
ruff
5+
shellcheck-py
6+
yamllint
7+
allowlist_externals = find
8+
commands =
9+
codespell
10+
ruff check -qn
11+
ruff format -qn --diff
12+
find . -name '*.sh' -exec shellcheck '{}' '+'
13+
yamllint .github

0 commit comments

Comments
 (0)