-
-
Notifications
You must be signed in to change notification settings - Fork 438
52 lines (43 loc) · 1.61 KB
/
check-specrefs.yml
File metadata and controls
52 lines (43 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Check Spec References
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [unstable, stable]
pull_request:
workflow_dispatch:
jobs:
check-specrefs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Check version consistency
run: |
SPEC_TEST_VERSION=$(grep 'specVersion:' packages/beacon-node/test/spec/specTestVersioning.ts | head -1 | sed 's/.*specVersion: "\(.*\)".*/\1/')
ETHSPECIFY_VERSION=$(grep '^version:' specrefs/.ethspecify.yml | sed 's/version: //')
if [ "$SPEC_TEST_VERSION" != "$ETHSPECIFY_VERSION" ]; then
echo "Version mismatch between specTestVersioning.ts and ethspecify"
echo " packages/beacon-node/test/spec/specTestVersioning.ts: $SPEC_TEST_VERSION"
echo " specrefs/.ethspecify.yml: $ETHSPECIFY_VERSION"
exit 1
else
echo "Versions match: $SPEC_TEST_VERSION"
fi
- name: Install ethspecify
run: python3 -mpip install ethspecify==0.3.9
- 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