Skip to content

fix(pytest): fix spec_version_checker args again #3

fix(pytest): fix spec_version_checker args again

fix(pytest): fix spec_version_checker args again #3

name: Check EIP Versions
on:
push:
pull_request:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 12 * * *" # Run daily at 12:00 UTC
jobs:
check_eip_versions:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
contents: read # needed for API access to GitHub
steps:
- name: Checkout ethereum/execution-spec-tests
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install uv ${{ vars.UV_VERSION }} and python ${{ matrix.python }}
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
version: ${{ vars.UV_VERSION }}
python-version: ${{ matrix.python }}
- name: Run EIP Version Checker
id: check-eip
continue-on-error: true
env:
# GitHub token provides API access for EIP version checking
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p ./reports
uv run check_eip_versions 2>&1 | tee ./reports/eip_check_output.txt
# Save the exit code but don't fail the workflow
exit_code=${PIPESTATUS[0]}
echo "exit_code=$exit_code" >> $GITHUB_OUTPUT
# Always return success to GitHub Actions
exit 0
- name: Generate report file
if: steps.check-eip.outputs.exit_code != 0
run: |
cat > ./reports/outdated_eips.md << 'EOL'
# EIP Version Check Report
This automated check has detected that some EIP references in test files are outdated. This means that the EIPs have been updated in the [ethereum/EIPs](https://github.com/ethereum/EIPs) repository since our tests were last updated.
## Outdated EIP References
The following EIP references need to be updated in our tests:
```
$(grep -A 10 "does not match that from ethereum/EIPs" ./reports/eip_check_output.txt || echo "No specific outdated EIPs found in the output.")
```
## Action Required
Please update the EIP reference versions in the affected test files. For each outdated reference:
1. Check the latest version of the EIP in the [ethereum/EIPs](https://github.com/ethereum/EIPs) repository
2. Update the `REFERENCE_SPEC_VERSION` in the test file to the latest commit SHA
3. Verify that the tests still pass with the updated reference
## Additional Information
For more details on the EIP version checking system, please see the documentation in the [execution-spec-tests](https://github.com/ethereum/execution-spec-tests) repository.
EOL
- name: Create Issue From File
if: steps.check-eip.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd
with:
title: "chore(tests): update outdated EIP spec references"
content-filepath: ./reports/outdated_eips.md
labels: report, automated issue, needs-attention
- name: Upload test report as artifact
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: eip-check-report
path: ./reports/
retention-days: 30