Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ jobs:
version: ${{ env.SHELLCHECK_VERSION }}
# Exclude vendored third-party scripts (dotnet-install.sh is the
# Microsoft .NET installer) and generated agent-template directories.
ignore_paths: dotnet-install.sh my-agent-0b2avt
ignore_paths: >-
*/dotnet-install.sh
my-agent-0b2avt
# Only fail CI on error-severity findings; warnings in our own
# scripts are reported but do not block the build.
severity: error
Expand Down
20 changes: 20 additions & 0 deletions tests/test_actionlint_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from pathlib import Path

import pytest
import yaml

pytestmark = pytest.mark.unit


def test_actionlint_shellcheck_ignores_vendored_dotnet_script() -> None:
workflow_path = Path(__file__).resolve().parents[1] / ".github" / "workflows" / "actionlint.yml"
workflow = yaml.safe_load(workflow_path.read_text(encoding="utf-8"))

shellcheck_step = next(
step for step in workflow["jobs"]["actionlint"]["steps"] if step.get("name") == "Setup ShellCheck (pinned)"
)

ignore_paths = shellcheck_step["with"]["ignore_paths"].split()
assert "*/dotnet-install.sh" in ignore_paths
Loading