Skip to content
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/check-specrefs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check Spec References
on: [push, pull_request]

jobs:
check-specrefs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check version consistency
run: |
MAKEFILE_VERSION=$(grep 'CONSENSUS_SPECS_TEST_VERSION ?=' testing/ef_tests/Makefile | sed 's/.*?= //')
ETHSPECIFY_VERSION=$(grep '^version:' specrefs/.ethspecify.yml | sed 's/version: //')
if [ "$MAKEFILE_VERSION" != "$ETHSPECIFY_VERSION" ]; then
echo "Version mismatch between Makefile and ethspecify"
echo " testing/ef_tests/Makefile: $MAKEFILE_VERSION"
echo " specrefs/.ethspecify.yml: $ETHSPECIFY_VERSION"
exit 1
else
echo "Versions match: $MAKEFILE_VERSION"
fi

- name: Install ethspecify
run: python3 -mpip install ethspecify

- name: Update spec references
run: ethspecify process --path=specrefs

- name: Check for differences
run: |
if ! git diff --exit-code -- specrefs >/dev/null; then
echo "Spec references are out-of-date!"
echo ""
git --no-pager diff -- specrefs
exit 1
else
echo "Spec references are up-to-date!"
fi

- name: Check spec references
run: ethspecify check --path=specrefs
Loading