• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 25441711719

06 May 2026 02:31PM UTC coverage: 92.915%. Remained the same
25441711719

push

github

web-flow
use sha pin (with comment) format for generated actions (#23312)

Per the GitHub Action best practices we recently enabled at #23249, we
should pin each action to a SHA so that the reference is actually
immutable.

This will -- I hope -- knock out a large chunk of the 421 alerts we
currently get from zizmor. The next followup would then be upgrades and
harmonizing the generated and none-generated pins.

Notice: This idea was suggested by Claude while going over pinact output
and I was surprised to see that post processing the yaml wasn't too
gross.

92206 of 99237 relevant lines covered (92.91%)

4.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/python/pants/testutil/skip_utils.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
import subprocess
5✔
5
from functools import lru_cache
5✔
6

7
import pytest
5✔
8

9
from pants.engine.platform import Platform
5✔
10

11

12
@lru_cache
5✔
13
def skip_if_command_errors(*args: str):
5✔
14
    def empty_decorator(func):
5✔
15
        return func
3✔
16

17
    try:
5✔
18
        subprocess.run(list(args), check=True)
5✔
19
    except (subprocess.CalledProcessError, FileNotFoundError):
×
20
        return pytest.mark.skip(reason="command failed")
×
21

22
    return empty_decorator
5✔
23

24

25
def skip_if_linux_arm64(func):
5✔
26
    """Skip the test if running on linux-arm64."""
27
    if Platform.create_for_localhost() == Platform.linux_arm64:
2✔
28
        return pytest.mark.skip(reason="Test cannot run on Linux ARM64. Skipping.")(func)
×
29
    else:
30

31
        def empty_decorator(func):
2✔
32
            return func
2✔
33

34
        return empty_decorator(func)
2✔
35

36

37
requires_go = skip_if_command_errors("go", "version")
5✔
38
requires_thrift = skip_if_command_errors("thrift", "-version")
5✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc