-
Notifications
You must be signed in to change notification settings - Fork 1.2k
123 lines (116 loc) · 4.39 KB
/
run-tests.yml
File metadata and controls
123 lines (116 loc) · 4.39 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Run tests
defaults:
run:
shell: zsh -e {0}
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: "pyproject.toml"
- name: Install uv ${{ vars.UV_VERSION }}
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
enable-cache: true
version: ${{ vars.UV_VERSION }}
- name: Run linter for pyspec
run: |
make lint
git diff --exit-code
whitespace:
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Check for trailing whitespace
run: |
if git grep -n '[[:blank:]]$'; then
echo "Trailing whitespace found. Please fix it."
exit 1
fi
comments:
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: "pyproject.toml"
- name: Check fork comments
run: python3 scripts/check_fork_comments.py
framework:
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: "pyproject.toml"
- name: Install uv ${{ vars.UV_VERSION }}
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
enable-cache: true
version: ${{ vars.UV_VERSION }}
- name: Run framework tests
run: make test component=fw
- name: Prepare test results for upload
if: always()
run: cp -r ./tests/core/pyspec/test-reports ./tests/core/pyspec/test-results-framework-${{ github.run_number }}
- name: Upload framework test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: test-results-framework-${{ github.run_number }}
path: ./tests/core/pyspec/test-results-framework-${{ github.run_number }}
tests:
needs: [lint, whitespace, comments, framework]
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
strategy:
matrix:
fork:
- phase0
- altair
- bellatrix
- capella
- deneb
- electra
- fulu
- gloas
- eip7805
- eip7928
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: "pyproject.toml"
- name: Install uv ${{ vars.UV_VERSION }}
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
enable-cache: true
version: ${{ vars.UV_VERSION }}
- name: Run pyspec tests for ${{ matrix.fork }}
run: make test component=pyspec preset=minimal fork=${{ matrix.fork }}
- name: Prepare test results for upload
if: always()
run: cp -r ./tests/core/pyspec/test-reports ./tests/core/pyspec/test-results-minimal-${{ matrix.fork }}-${{ github.run_number }}
- name: Upload ${{ matrix.fork }} test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: test-results-minimal-${{ matrix.fork }}-${{ github.run_number }}
path: ./tests/core/pyspec/test-results-minimal-${{ matrix.fork }}-${{ github.run_number }}