Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Draft
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,37 @@ jobs:
push_rolling: true
repo: ${{ vars.CODECOV_IMAGE_V2 || 'codecov/self-hosted-api' }}
cache_file: "uv.lock"

upload-overwatch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Static Analysis Tools
run: |
pip install mypy==1.15.0
pip install ruff==0.3.3
- name: Install Build Dependencies
run: |
sudo apt-get update
# Install libssl1.1 from Ubuntu 20.04 repositories
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
- name: Install Overwatch CLI
run: |
curl -o overwatch-cli https://overwatch.codecov.dev/linux/cli
chmod +x overwatch-cli
- name: Print Current Working Directory
run: pwd
- name: List Contents of Current Working Directory
run: ls -la
- name: List Directories Under Root
run: ls -d /*/
- name: Run Overwatch CLI
run: |
./overwatch-cli \
--auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \
--organization-slug codecov \
python \
--python-path $(which python3)


48 changes: 48 additions & 0 deletions .github/workflows/upload-overwatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Created on 2025-03-20 14:30:36
name: Upload Overwatch - 2025-03-20 14:30:36

on:
pull_request:
types:
- opened
- synchronize
push:
branches-ignore:
- main

jobs:
upload-overwatch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install UV
run: pip install uv
- name: Install Project Dependencies
run: |
uv export --format requirements-txt > requirements.txt
uv pip install -r requirements.txt --system
- name: Install Static Analysis Tools
run: |
pip install mypy==1.15.0
pip install ruff==0.9.6
- name: Install Build Dependencies
run: |
sudo apt-get update
# Install libssl1.1 from Ubuntu 20.04 repositories
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
- name: Install Overwatch CLI
run: |
curl -o overwatch-cli https://overwatch.codecov.dev/linux/cli
chmod +x overwatch-cli
- name: Run Overwatch CLI
run: |
./overwatch-cli \
--auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \
--organization-slug codecov \
--pullid 1196 \
python \
--python-path $(which python3)
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ lint.install.local:
uv add --dev ruff

lint.run:
ruff check
ruff format

lint.check:
echo "Linting..."
ruff check
echo "Formatting..."
ruff format --check

build.requirements:
# if docker pull succeeds, we have already build this version of
Expand Down
8 changes: 8 additions & 0 deletions services/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ def component_filtered_report(
"""
Filter a report such that the totals, etc. are only pertaining to the given component.
"""
print(report)
print(components)

# This will fail mypy with "Item "None" of "Optional[Report]" has no attribute "filter""
# Because we're not checking if report is None before accessing filter()
report: Optional[Report] = report
filtered_report = report.filter(flags=flags, paths=paths)

flags, paths = [], []
for component in components:
flags.extend(component.get_matching_flags(report.flags.keys()))
Expand Down