Skip to content

Commit 2707837

Browse files
adrianreberclaude
andcommitted
ci: move lint jobs to dedicated workflow with container
Move lint_markdown and lint jobs from validate.yml to new lint.yml workflow. Update lint job to use ghcr.io/openhpc/ohpc-lint:latest container, removing need for manual package installation of linting tools (codespell, ruff, ShellCheck, shfmt, clang-tools-extra). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Adrian Reber <[email protected]>
1 parent 51c9626 commit 2707837

File tree

2 files changed

+37
-28
lines changed

2 files changed

+37
-28
lines changed

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- 4.x
7+
pull_request:
8+
branches:
9+
- 4.x
10+
11+
jobs:
12+
lint_markdown:
13+
name: Run markdown linter
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Lint markdown
18+
uses: DavidAnson/markdownlint-cli2-action@v15
19+
with:
20+
globs: |
21+
README.md
22+
CONTRIBUTING.md
23+
containers/README.md
24+
.github/workflows/README.md
25+
26+
lint:
27+
strategy:
28+
matrix:
29+
step: [codespell, ruff-check, ruff-format, shellcheck, whitespace, shfmt, clang-format]
30+
name: Run ${{ matrix.step }} linter
31+
runs-on: ubuntu-latest
32+
container:
33+
image: ghcr.io/openhpc/ohpc-lint:latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Run ${{ matrix.step }}
37+
run: make -C tests/ci/ ${{ matrix.step }}-lint

.github/workflows/validate.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,6 @@ jobs:
3535
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
3636
tests/ci/check_spec.py ${{ steps.files.outputs.added_modified }}
3737
38-
lint_markdown:
39-
name: Run markdown linter
40-
runs-on: ubuntu-latest
41-
steps:
42-
- uses: actions/checkout@v4
43-
- name: Lint markdown
44-
uses: DavidAnson/markdownlint-cli2-action@v15
45-
with:
46-
globs: |
47-
README.md
48-
CONTRIBUTING.md
49-
containers/README.md
50-
.github/workflows/README.md
51-
52-
lint:
53-
strategy:
54-
matrix:
55-
step: [codespell, ruff-check, ruff-format, shellcheck, whitespace, shfmt, clang-format]
56-
name: Run ${{ matrix.step }} linter
57-
runs-on: ubuntu-latest
58-
container:
59-
image: registry.fedoraproject.org/fedora:latest
60-
steps:
61-
- name: Setup
62-
run: dnf -y install codespell make ruff ShellCheck shfmt clang-tools-extra git
63-
- uses: actions/checkout@v4
64-
- name: Run ${{ matrix.step }}
65-
run: make -C tests/ci/ ${{ matrix.step }}-lint
6638
6739
build_on_rhel:
6840
strategy:

0 commit comments

Comments
 (0)