Skip to content

Commit a4a85ef

Browse files
authored
feat(ci,deps): lint workflow files; check deps are pinned (#2005)
1 parent 2b1d1c0 commit a4a85ef

8 files changed

Lines changed: 101 additions & 3 deletions

File tree

.github/actionlint.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
self-hosted-runner:
2+
labels:
3+
- self-hosted-ghr
4+
- size-l-x64
5+
- size-xl-x64
6+
- size-gigachungus-x64

.github/actions/build-fixtures/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build and Package Fixture Release
2+
description: Build test fixtures and package them for release
23
inputs:
34
release_name:
45
description: "Name of the fixture release"

.github/workflows/release_fixture_feature.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
FEATURE_PREFIX="${GITHUB_REF_NAME//@*/}"
2424
FEATURE_NAME="${FEATURE_PREFIX#tests-}"
2525
names=$(grep -Po "^${FEATURE_NAME}(?=:)" .github/configs/feature.yaml | jq --raw-input . | jq -c --slurp .)
26-
echo names=${names}
27-
echo names=${names} >> "$GITHUB_OUTPUT"
26+
echo "names=${names}"
27+
echo "names=${names}" >> "$GITHUB_OUTPUT"
2828
2929
build:
3030
needs: feature-names

.github/workflows/release_fixture_full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
# Get all features without `feature_only: true`
2121
grep -Po "^[0-9a-zA-Z_\-]+" ./.github/configs/feature.yaml | \
22-
while read feature; do
22+
while read -r feature; do
2323
if ! awk "/^$feature:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag && /feature_only:.*true/{exit 1}" \
2424
./.github/configs/feature.yaml; then
2525
continue

.github/workflows/test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
2121
with:
2222
submodules: recursive
23+
- name: Ensure SHA pinned actions
24+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@6124774845927d14c601359ab8138699fa5b70c3 # v4.0.1
2325
- name: Setup Python
2426
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
2527
with:
@@ -31,6 +33,18 @@ jobs:
3133
pip install 'tox>=4.11,<5' requests
3234
- name: Run static checks
3335
run: tox -e static
36+
- name: Setup uv
37+
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
38+
- name: Validate workflow config variables
39+
run: |
40+
cat >> .github/actionlint.yaml << 'EOF'
41+
42+
# CI-only: validate vars.* references
43+
config-variables:
44+
- DEFAULT_PYTHON_VERSION
45+
- UV_VERSION
46+
EOF
47+
uvx --from actionlint-py actionlint
3448
3549
py3:
3650
runs-on: [self-hosted-ghr, size-xl-x64]

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ lint = [
182182
"vulture==2.14.0",
183183
"types-requests>=2.31,<2.33",
184184
]
185+
actionlint = [
186+
"actionlint-py>=1.7",
187+
"pyflakes>=3.0",
188+
"shellcheck-py>=0.10",
189+
]
185190
doc = [
186191
"docc>=0.3.0,<0.4.0",
187192
"fladrif>=0.2.0,<0.3.0",
@@ -210,6 +215,7 @@ mkdocs = [
210215
dev = [
211216
{ include-group = "test" },
212217
{ include-group = "lint" },
218+
{ include-group = "actionlint" },
213219
{ include-group = "doc" },
214220
{ include-group = "mkdocs" },
215221
"ethereum-execution[optimized]",

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ commands =
3434
mypy
3535
ethereum-spec-lint
3636
uv lock --check
37+
actionlint -pyflakes pyflakes -shellcheck "shellcheck -S warning"
3738

3839
[testenv:tests_pytest_py3]
3940
description = Run the testing package unit tests (with Python)

uv.lock

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)