Skip to content

Commit

Permalink
DAOS-16263 cq: merge yamllint and clang-format into linting
Browse files Browse the repository at this point in the history
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.

Skip-test: true
Skip-build: true

Required-githooks: true

Signed-off-by: Dalton Bohning <dalton.bohning@intel.com>
  • Loading branch information
daltonbohning committed Jul 22, 2024
1 parent c8d5ab9 commit 0d80de0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 76 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/clang-format.yml

This file was deleted.

48 changes: 47 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,56 @@ jobs:
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@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
- 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@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
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@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment
uses: actions/setup-python@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
with:
python-version: '3'
- name: Install extra python packages
run: pip install --requirement utils/cq/requirements.txt
- name: Run check

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 1: pipCommand not pinned by hash
Click Remediation section below to solve this issue
run: yamllint --format github .

linting-summary:
name: Linting Summary
runs-on: ubuntu-22.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 0d80de0

Please sign in to comment.