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

DO NOT MERGE!!! Check coverage comments #1062

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a64c759
Add a dummy file
kumaranvpl Feb 7, 2025
566598a
Add failing test for dummy
kumaranvpl Feb 7, 2025
8e206d2
Update test
kumaranvpl Feb 7, 2025
9056674
Fix dummy tests
kumaranvpl Feb 7, 2025
2508655
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 12, 2025
a6a74f2
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 13, 2025
297de50
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 13, 2025
0832a4c
Merge branch 'check-coverage-comments' of github.com:ag2ai/ag2 into c…
kumaranvpl Feb 13, 2025
63083d7
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 14, 2025
aa0644a
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 14, 2025
edb35dd
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 14, 2025
b037378
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 17, 2025
f46420e
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 17, 2025
2aa8d6b
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 17, 2025
ef81e8f
Add codecov.yml with sane defaults
kumaranvpl Feb 17, 2025
d01eb98
Add validated codecov.yml
kumaranvpl Feb 17, 2025
6b1e747
Update codecov config
kumaranvpl Feb 17, 2025
3e3db00
Increase n builds
kumaranvpl Feb 17, 2025
82440cc
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 18, 2025
f6492fd
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 19, 2025
b58bb26
Merge branch 'check-coverage-comments' of github.com:ag2ai/ag2 into c…
kumaranvpl Feb 19, 2025
1cf0951
Disable codecov commenting
kumaranvpl Feb 19, 2025
f66b409
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 19, 2025
59a2016
Hide project coverage
kumaranvpl Feb 19, 2025
80d0e3d
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 19, 2025
f98c43f
Change comment layout and other minor stuff
kumaranvpl Feb 19, 2025
18c22b9
Reduce after_n_builds
kumaranvpl Feb 19, 2025
392bbeb
Revert some changes
kumaranvpl Feb 19, 2025
b5a4787
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 19, 2025
792ef3d
Increase after_n_builds
kumaranvpl Feb 19, 2025
87e3eee
Increase after_n_builds
kumaranvpl Feb 19, 2025
10f69af
Trigger codecov manually
kumaranvpl Feb 19, 2025
50dc60d
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 19, 2025
5069b29
Add permissions
kumaranvpl Feb 19, 2025
24b78cd
Remove graphrag tests as requirement
kumaranvpl Feb 19, 2025
d2fd4f2
Push without concurrency
kumaranvpl Feb 19, 2025
4ea0fdc
Do not fail with failure
kumaranvpl Feb 19, 2025
c70eab2
Update codecov
kumaranvpl Feb 20, 2025
25a1eea
Merge branch 'main' into check-coverage-comments
kumaranvpl Feb 20, 2025
04a6cd8
Turn off manual trigger
kumaranvpl Feb 20, 2025
e180e7b
Add sub
kumaranvpl Feb 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
27 changes: 27 additions & 0 deletions .github/workflows/notify-codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Notify Codecov

on:
workflow_run:
workflows:
- "Contrib tests with LLMs"
- "Contrib tests without LLMs"
- "Core tests with LLMs"
- "Core tests without LLMs"
- "Integration tests"
- "Test with optional dependencies"
types:
- completed

permissions: {}

jobs:
notify:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Send Codecov notification
uses: codecov/codecov-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Notify Codecov' step
Uses Step
uses 'codecov/codecov-action' with ref 'v3', not a pinned commit hash
with:
run_command: send-notifications
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
17 changes: 17 additions & 0 deletions autogen/dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2023 - 2025, AG2ai, Inc., AG2ai open-source projects maintainers and core contributors
#
# SPDX-License-Identifier: Apache-2.0

from math import ceil


def add(a: int, b: int) -> int:
return a + b


def ag2_ceil(x: float) -> int:
return ceil(x)


def sub(a: int, b: int) -> int:
return a - b
20 changes: 15 additions & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
codecov:
require_ci_to_pass: yes
notify:
after_n_builds: 15
# manual_trigger: true
after_n_builds: 30
wait_for_ci: yes

coverage:
status:
project:
default:
# Basic settings
informational: true
target: auto
threshold: 1%
base: auto
if_ci_failed: success
base: auto
branches:
- main
patch:
default:
# Settings for new code in PRs
informational: true
target: auto
threshold: 1%
if_ci_failed: success
base: auto

# Configure codecov bot behavior
comment: false
comment:
# Show only changed files in PR comment
layout: "condensed_header, condensed_files, condensed_footer"
behavior: new
# Hide PR comment if there are no changes in coverage
require_changes: true
# Only post comment after all builds finish
after_n_builds: 30
hide_project_coverage: true

# Ignore certain paths/files
ignore:
Expand Down
17 changes: 17 additions & 0 deletions test/test_dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2023 - 2025, AG2ai, Inc., AG2ai open-source projects maintainers and core contributors
#
# SPDX-License-Identifier: Apache-2.0

from autogen.dummy import add, ag2_ceil


def test_add() -> None:
actual = add(3, 5)
expected = 8
assert actual == expected


def test_ag2_ceil() -> None:
actual = ag2_ceil(0.9)
expected = 1
assert actual == expected
Loading