diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index bfe1ffe762..ad043290a9 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -3,7 +3,7 @@ name: Evmone Coverage Report on: pull_request: paths: - - 'converted-ethereum-tests.txt' # This triggers the workflow only for changes in file.txt + - 'tests/**' # This triggers the workflow for any changes in the tests folder jobs: evmone-coverage-diff: @@ -74,14 +74,16 @@ jobs: - name: Parse converted tests from converted-ethereum-tests.txt run: | echo "New lines introduced in converted-ethereum-tests.txt:" - lines=$(git diff origin/${{ github.base_ref }} HEAD -- converted-ethereum-tests.txt | grep "^+" | grep -v "^+++") - files=$(echo "$lines" | grep -oP '(?<=\+).+\.json') - - if [ -z "$files" ]; then - echo "Error: No new JSON files found in converted-ethereum-tests.txt" - exit 1 + lines=$(git diff origin/${{ github.base_ref }} HEAD -- converted-ethereum-tests.txt | grep "^+" | grep -v "^+++" || true) + if [ -z "$lines" ]; then + echo "No new lines in converted-ethereum-tests.txt, check updates instead:" + echo "converted_skip=true" >> $GITHUB_ENV + exit 0 + else + echo "converted_skip=false" >> $GITHUB_ENV fi + files=$(echo "$lines" | grep -oP '(?<=\+).+\.json') for file in $files; do echo $file done @@ -118,7 +120,7 @@ jobs: exit 1 fi done - + # This command diffs the .py scripts introduced by a PR - name: Parse and fill introduced test sources @@ -182,6 +184,10 @@ jobs: find fixtures/state_tests -type f -name "*.json" -exec cp {} $PATCH_TEST_PATH \; find fixtures/eof_tests -type f -name "*.json" -exec cp {} $PATCH_TEST_PATH \; + if [ "${{ env.converted_skip }}" == 'true' ]; then + echo "Try to detect the same files in revision before PR" + fi + - name: Print tests that will be covered if: ${{ env.retesteth_skip == 'false' || matrix.driver == 'native' }} run: | diff --git a/tests/homestead/coverage/test_coverage.py b/tests/homestead/coverage/test_coverage.py index 59dc0353cf..8088a1de63 100644 --- a/tests/homestead/coverage/test_coverage.py +++ b/tests/homestead/coverage/test_coverage.py @@ -37,8 +37,6 @@ def test_coverage( + Op.PUSH1(0x0D) + Op.PUSH1(0x0E) + Op.SWAP1() - + Op.DUP1() - + Op.DUP2() + Op.PUSH0() + Op.PUSH2(0x0102) + Op.PUSH3(0x010203)