Skip to content

Commit de0bfd9

Browse files
authored
feat(github): coverage on native evmone test runners (#628)
* coverage on native evmone test runners * Update PULL_REQUEST_TEMPLATE.md
1 parent f96e7b5 commit de0bfd9

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
- [ ] All: Added an entry to [CHANGELOG.md](/ethereum/execution-spec-tests/blob/main/docs/CHANGELOG.md).
1111
- [ ] All: Considered updating the online docs in the [./docs/](/ethereum/execution-spec-tests/blob/main/docs/) directory.
1212
- [ ] Tests: All converted JSON/YML tests from [ethereum/tests](/ethereum/tests) have been added to [converted-ethereum-tests.txt](/ethereum/execution-spec-tests/blob/main/converted-ethereum-tests.txt).
13+
- [ ] Tests: A PR with removal of converted JSON/YML tests from [ethereum/tests](/ethereum/tests) have been opened.
1314
- [ ] Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
1415
- [ ] Tests: Ran `mkdocs serve` locally and verified the auto-generated docs for new tests in the [Test Case Reference](https://ethereum.github.io/execution-spec-tests/main/tests/) are correctly formatted.

.github/workflows/coverage.yaml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
jobs:
99
evmone-coverage-diff:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
driver: [retesteth, native]
14+
1115
steps:
1216
- name: Checkout code
1317
uses: actions/checkout@v3
@@ -20,20 +24,12 @@ jobs:
2024
echo $(pwd)
2125
echo ${{ github.workspace }}
2226
23-
#install solc for `pip install -e .` command
24-
curl -L --output solc "https://github.com/ethereum/solidity/releases/download/v0.8.25/solc-static-linux"
25-
sudo mv solc /usr/local/bin
26-
sudo chmod +x /usr/local/bin/solc
27-
solc --version
28-
2927
#install pyspec deps from root repo
3028
python3 --version
29+
pip install --upgrade pip
3130
python3 -m venv ./venv/
3231
source ./venv/bin/activate
3332
pip install -e .
34-
35-
# fix pyspec dependecy
36-
pip3 install solc-select
3733
solc-select use 0.8.25 --always-install
3834
3935
# Required to fill .py tests
@@ -120,19 +116,20 @@ jobs:
120116
echo "$files" | while read line; do
121117
file=$(echo "$line" | cut -c 3-)
122118
fill $file --until=Cancun --evm-bin evmone-t8n || true
123-
fill $file --fork=CancunEIP7692 --evm-bin evmone-t8n || true
119+
fill $file --fork=CancunEIP7692 --evm-bin evmone-t8n -k eof_test || true
124120
done
125121
126122
filesState=$(find fixtures/state_tests -type f -name "*.json")
127123
filesEOF=$(find fixtures/eof_tests -type f -name "*.json")
128-
if [ -z "$filesState" || -z "$filesEOF" ]; then
124+
if [ -z "$filesState" ] && [ -z "$filesEOF" ]; then
129125
echo "Error: No filled JSON fixtures found in fixtures."
130126
exit 1
131127
fi
132128
133-
mkdir -p ${{ github.workspace }}/evmtest_coverage/coverage/PATCH_TESTS
134-
find fixtures/state_tests -type f -name "*.json" -exec cp {} ${{ github.workspace }}/evmtest_coverage/coverage/PATCH_TESTS \;
135-
find fixtures/eof_tests -type f -name "*.json" -exec cp {} ${{ github.workspace }}/evmtest_coverage/coverage/PATCH_TESTS \;
129+
PATCH_TEST_PATH=${{ github.workspace }}/evmtest_coverage/coverage/PATCH_TESTS
130+
mkdir -p $PATCH_TEST_PATH
131+
find fixtures/state_tests -type f -name "*.json" -exec cp {} $PATCH_TEST_PATH \;
132+
find fixtures/eof_tests -type f -name "*.json" -exec cp {} $PATCH_TEST_PATH \;
136133
137134
- name: Print tests that will be covered
138135
run: |
@@ -147,14 +144,14 @@ jobs:
147144
with:
148145
image: winsvega/evmone-coverage-script:latest
149146
options: -v ${{ github.workspace }}/evmtest_coverage/coverage:/tests
150-
run: /entrypoint.sh --mode=cover --testpath=/tests/BASE_TESTS --outputname=BASE
147+
run: /entrypoint.sh --mode=cover --driver=${{ matrix.driver }} --testpath=/tests/BASE_TESTS --outputname=BASE
151148

152149
- name: Run coverage of the PATCH tests
153150
uses: addnab/docker-run-action@v3
154151
with:
155152
image: winsvega/evmone-coverage-script:latest
156153
options: -v ${{ github.workspace }}/evmtest_coverage/coverage:/tests
157-
run: /entrypoint.sh --mode=cover --testpath=/tests/PATCH_TESTS --outputname=PATCH
154+
run: /entrypoint.sh --mode=cover --driver=${{ matrix.driver }} --testpath=/tests/PATCH_TESTS --outputname=PATCH
158155

159156
- name: Run coverage DIFF of the PATCH tests compared to BASE tests
160157
uses: addnab/docker-run-action@v3

0 commit comments

Comments
 (0)