Skip to content

Commit

Permalink
DAOS-16263 cq: merge yamllint and clang-format into linting (#14803) (#…
Browse files Browse the repository at this point in the history
…15642)

merge yamllint and clang-format into linting workflow so all lint checks
are grouped together.

Make yaml-lint required but clang-format optional until stable.

Signed-off-by: Dalton Bohning <dalton.bohning@hpe.com>
  • Loading branch information
daltonbohning authored Dec 20, 2024
1 parent 96c64de commit 1aeb63e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 77 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/clang-format.yml

This file was deleted.

50 changes: 48 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,64 @@ jobs:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install extra python packages
run: pip install --requirement utils/cq/requirements.txt
run: python3 -m pip install --requirement utils/cq/requirements.txt
- name: Run check
uses: codespell-project/actions-codespell@3174815d6231f5bdc24dbfb6fc3b8caec73d521c # master
with:
skip: ./src/control/vendor,./src/control/go.sum,./.git
ignore_words_file: ci/codespell.ignores
builtin: clear,rare,informal,names,en-GB_to_en-US

clang-format:
name: Clang Format
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Pull via git
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Run check in docker
uses: ./.github/actions/clang-format
with:
target: origin/${{ github.event.pull_request.base.ref }}
- name: Export changes
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: format-patch-for-pr-${{ github.event.pull_request.number }}
path: auto-format-changes.diff

yaml-lint:
name: Yamllint check
runs-on: ubuntu-22.04
steps:
- name: Check out source repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3'
- name: Install extra python packages
run: python3 -m pip install --requirement utils/cq/requirements.txt
- name: Run check
run: yamllint --format github .

linting-summary:
name: Linting Summary
runs-on: ubuntu-24.04
needs: [isort, shell-check, log-check, ftest-tags, flake8-lint, doxygen, pylint, codespell]
needs:
- isort
- shell-check
- log-check
- ftest-tags
- flake8-lint
- doxygen
- pylint
- codespell
# - clang-format # not required
- yaml-lint
if: (!cancelled())
steps:
- name: Check if any job failed
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/yaml.yml

This file was deleted.

0 comments on commit 1aeb63e

Please sign in to comment.