Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[ci]: upload code coverage once #4452

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
bec6e8d
upload code cov once
tserg Jan 17, 2025
5f1226c
remove backslash
tserg Jan 17, 2025
e26fead
try adding line break
tserg Jan 17, 2025
e4e108b
set up python
tserg Jan 17, 2025
5fc75e3
defer codecov upload to end
tserg Jan 17, 2025
cdbe0d4
upload and download artifacts
tserg Jan 17, 2025
5b65bd4
add missing job index when creating cov file
tserg Jan 17, 2025
75ebc34
remove cov append
tserg Jan 17, 2025
7e0cc2f
remove leading period
tserg Jan 17, 2025
109f9a7
set merge-multiple to true
tserg Jan 17, 2025
fbdb8bb
use v4
tserg Jan 17, 2025
f6155ec
bump other v3 to v4
tserg Jan 17, 2025
357c063
add github job for unique file
tserg Jan 17, 2025
c085014
fix coverage path
tserg Jan 18, 2025
06eacb3
remove leading period for combine
tserg Jan 18, 2025
929fcd6
rename files
tserg Jan 18, 2025
d30a9d4
add line break
tserg Jan 18, 2025
de1a070
rename combine path
tserg Jan 18, 2025
6d8d44b
debug step
tserg Jan 18, 2025
8a3f4f9
upload all files
tserg Jan 18, 2025
3e6cac7
suppress printing
tserg Jan 18, 2025
290942b
add leading period
tserg Jan 18, 2025
0850d3b
include hidden files
tserg Jan 18, 2025
6a52b77
show hidden
tserg Jan 18, 2025
6890d6d
set COVERAGE_PARALLEL
tserg Jan 18, 2025
f6de133
Revert "set COVERAGE_PARALLEL"
tserg Jan 18, 2025
1fa4f5c
set parallel in setup.cfg
tserg Jan 18, 2025
5a59076
set cov config flag
tserg Jan 18, 2025
353a23f
try using coverage directly
tserg Jan 19, 2025
8416d79
add report section
tserg Jan 19, 2025
102ad3e
specify source
tserg Jan 19, 2025
b000f67
skip non-fuzzing
tserg Jan 19, 2025
6410889
fix command
tserg Jan 19, 2025
9a94fac
add paths
tserg Jan 19, 2025
c395adc
some fixes
charles-cooper Jan 19, 2025
ad361ad
turn off merge-multiple
charles-cooper Jan 19, 2025
e484ec6
remove wildcard
charles-cooper Jan 19, 2025
2bb18ff
debug
charles-cooper Jan 19, 2025
ae73d7e
update download-artifacts
charles-cooper Jan 19, 2025
f5fd59f
paths
charles-cooper Jan 19, 2025
5fdd318
Revert "paths"
charles-cooper Jan 19, 2025
4e8dc68
set relative files; re-add config to setup.cfg
tserg Jan 20, 2025
70fa4f8
ignore errors
tserg Jan 20, 2025
3f79bd5
fix report header
tserg Jan 20, 2025
c5c3ebf
try deleting relative_files
tserg Jan 20, 2025
caf84ac
try using coverage directly
tserg Jan 20, 2025
cf34db6
add missing flag
tserg Jan 20, 2025
00b41b3
add wildcard for paths
tserg Jan 20, 2025
d017456
Revert "add wildcard for paths"
tserg Jan 20, 2025
374f0a4
Revert "add missing flag"
tserg Jan 20, 2025
290e164
Revert "try using coverage directly"
tserg Jan 20, 2025
ba4f923
move cov flag to config
tserg Jan 20, 2025
85ecb7d
clean up config
tserg Jan 20, 2025
3c286ed
remove debug step
tserg Jan 20, 2025
64df347
remove ignore errors
tserg Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 47 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,17 @@ jobs:
--evm-backend ${{ matrix.evm-backend || 'revm' }}
${{ matrix.debug && '--enable-compiler-debug-mode' || '' }}
${{ matrix.experimental-codegen && '--experimental-codegen' || '' }}
--cov-branch
--cov-report xml:coverage.xml
--cov-config=setup.cfg
--cov=vyper
tests/

- name: Upload Coverage
uses: codecov/codecov-action@v5
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: coverage-files-${{ github.job }}-${{ strategy.job-index }}
include-hidden-files: true
path: .coverage
if-no-files-found: error

core-tests-success:
if: always()
Expand Down Expand Up @@ -209,16 +210,17 @@ jobs:
--splits 120 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--cov-branch \
--cov-report xml:coverage.xml \
--cov-config=setup.cfg \
--cov=vyper \
tests/

- name: Upload Coverage
uses: codecov/codecov-action@v5
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: coverage-files-${{ github.job }}-${{ strategy.job-index }}
include-hidden-files: true
path: .coverage
if-no-files-found: error

slow-tests-success:
if: always()
Expand All @@ -231,3 +233,36 @@ jobs:
- name: Check slow tests all succeeded
if: ${{ needs.fuzzing.result != 'success' }}
run: exit 1

code-coverage:
runs-on: ubuntu-latest
needs: [tests, fuzzing]

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"

- name: Install coverage
run: pip install coverage

- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: coverage-files-*
path: coverage-files

- name: Combine coverage
run: |
coverage combine coverage-files/**/.coverage
coverage xml

- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ markers =
fuzzing: Run Hypothesis fuzz test suite (deselect with '-m "not fuzzing"')
requires_evm_version(version): Mark tests that require at least a specific EVM version and would throw `EvmVersionException` otherwise
venom_xfail: mark a test case as a regression (expected to fail) under the venom pipeline


[coverage:run]
branch = True
Loading