Files
ardupilot/.github/workflows/test_scripts.yml
T
James HarveyandClaude Opus 5 20fe331ef4 .github: do not run CI on tag pushes
The release procedure pushes about twenty tags at a single commit: the
per-vehicle -stable and -beta tags and the numbered ones such as
Copter-4.7.1.  Only pre-commit.yml's push trigger carries a branch
filter, so every other workflow runs for each of those tag pushes, and
path filters are not evaluated for tag pushes, so the paths-ignore
lists do not thin them out.  The 4.7.1 release produced 438 push-event
runs for one commit; 18 came from the ArduPilot-4.7 branch push and
the other 420 from the tags, each re-running the same jobs on the same
commit.  4.7.0 produced 437, and the pattern goes back to at least
4.6.2.

Filter push triggers to branches.  '**' matches every branch, so branch
pushes behave exactly as before; tag pushes stop triggering workflows.
The tags still show the commit's checks, since check results attach to
the commit; those are the release-branch push's runs, trimmed by the
usual path filters as on any other branch.

test_scripts.yml used the list form of 'on', which cannot carry a
filter, so it is expanded to the mapping form.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-05 09:09:22 +10:00

61 lines
1.4 KiB
YAML

name: test scripts
on:
push:
branches: ['**'] # excludes tag pushes
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-slim
strategy:
fail-fast: false # don't cancel if a job from the matrix fails
matrix:
config: [
astyle-cleanliness,
check_autotest_options,
logger_metadata,
param_parse,
param-file-validation,
python-cleanliness,
shellcheck,
validate_board_list,
]
steps:
# git checkout the PR
- uses: actions/checkout@v7
with:
submodules: false
persist-credentials: false
- name: checkout waf submodule
run: git submodule update --init --recursive --depth 1 modules/waf
- name: install pip dependencies
shell: bash
run: |
python3 -m pip install flake8 lxml pexpect
- name: Install astyle
if: matrix.config == 'astyle-cleanliness'
shell: bash
run: |
sudo apt-get update
sudo apt-get install --yes astyle
- name: test ${{matrix.config}}
env:
CI_BUILD_TARGET: ${{matrix.config}}
shell: bash
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
Tools/scripts/build_ci.sh