mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:53:37 +03:00
CI: consolidate workflows for source and docs check
A bunch of tiny jobs that run various source or documentation checks are consolidated into two workflow files: checksrc.yml and checkdocs.yml. This reduces the proliferation of new files containing one-line checks and brings those that operate similarly together for better reasoning about them. The man-examples check is also now running again for the first time in 7 months. Various calls to find, xargs and git ls-files are changed where possible to use NUL line terminators in pipes to avoid issues with oddly-named files that might find their way into the repo. Closes #14654
This commit is contained in:
parent
6429ce8e5f
commit
5629bb7cf6
14 changed files with 219 additions and 435 deletions
79
.github/workflows/checksrc.yml
vendored
79
.github/workflows/checksrc.yml
vendored
|
|
@ -2,28 +2,93 @@
|
|||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
name: checksrc
|
||||
# This workflow contains checks at the source code level only.
|
||||
|
||||
name: Source
|
||||
|
||||
on:
|
||||
# Trigger the workflow on push or pull requests, but only for the
|
||||
# master branch
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*/ci'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/CMakeLists.txt'
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'plan9/**'
|
||||
- 'tests/data/**'
|
||||
- 'winbuild/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/CMakeLists.txt'
|
||||
- '.azure-pipelines.yml'
|
||||
- '.circleci/**'
|
||||
- 'appveyor.*'
|
||||
- 'CMake/**'
|
||||
- 'plan9/**'
|
||||
- 'tests/data/**'
|
||||
- 'winbuild/**'
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
all:
|
||||
|
||||
checksrc:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
name: checkout
|
||||
|
||||
- name: check
|
||||
run: git ls-files "*.[ch]" | xargs -n1 ./scripts/checksrc.pl
|
||||
run: git ls-files -z "*.[ch]" | xargs -0 -n1 ./scripts/checksrc.pl
|
||||
|
||||
codespell:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
name: checkout
|
||||
|
||||
- name: install
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install codespell
|
||||
|
||||
- name: spellcheck
|
||||
run: codespell --skip src/tool_hugehelp.c -I .github/scripts/codespell-ignore.txt include src lib
|
||||
|
||||
reuse:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
name: checkout
|
||||
|
||||
- name: REUSE Compliance Check
|
||||
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4
|
||||
|
||||
miscchecks:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
name: checkout
|
||||
|
||||
- name: shellcheck
|
||||
run: .github/scripts/shellcheck.sh
|
||||
|
||||
- name: spacecheck
|
||||
run: .github/scripts/spacecheck.pl
|
||||
|
||||
- name: binarycheck
|
||||
run: .github/scripts/binarycheck.pl
|
||||
|
||||
# we allow some extra in source code
|
||||
- name: badwords
|
||||
run: >
|
||||
grep -Ev '(\\bwill| url | dir )' .github/scripts/badwords.txt |
|
||||
.github/scripts/badwords.pl `git ls-files -- src lib include`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue