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

Ci: refactor pip install logic for test and lint fix #26 #27

Merged
merged 1 commit into from
Nov 4, 2022
Merged

Ci: refactor pip install logic for test and lint fix #26 #27

merged 1 commit into from
Nov 4, 2022

Conversation

yihong0618
Copy link
Contributor

@yihong0618 yihong0618 commented Nov 1, 2022

fix: #26
refactor pip install logic for test and lint
for pyproject.toml repo there is an easy way to install
this PR make the GitHub Actions cleaner.
my passed job can check https://github.com/yihong0618/pgtracer/actions/runs/3367072889/jobs/5584216925
the reason this Actions failed is that I can not upload coverage reports to Codecov

@yihong0618 yihong0618 requested a review from a team as a code owner November 1, 2022 05:42
@yihong0618 yihong0618 changed the title Ci: refactor pip install logic for test and lint Ci: refactor pip install logic for test and lint fix #26 Nov 1, 2022
python -c 'import toml; open("requirements.txt.tmp", "a").write("\n".join(toml.load(open("pyproject.toml"))["project"]["optional-dependencies"]["lint"]) + "\n")'
pip install -r requirements.txt.tmp
python -c "import bcc; print(bcc.__file__)"
pip install -U pip toml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install the latest pip contains setuptools

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great I didn't know about this !

python -c "import bcc; print(bcc.__file__)"

- id: tests
run: |
sudo PYTHONPATH=$(pwd)/src pytest --postgresql-exec /usr/lib/postgresql/${{matrix.postgresql_version}}/bin/pg_ctl --cov --cov-report=xml
sudo pytest --postgresql-exec /usr/lib/postgresql/${{matrix.postgresql_version}}/bin/pg_ctl --cov --cov-report=xml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need set PYTHONPATH here since we install the pgtracer package

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Base: 90.37% // Head: 94.15% // Increases project coverage by +3.78% 🎉

Coverage data is based on head (8438016) compared to base (26f8f86).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   90.37%   94.15%   +3.78%     
==========================================
  Files          12        4       -8     
  Lines        1776      308    -1468     
==========================================
- Hits         1605      290    -1315     
+ Misses        171       18     -153     
Impacted Files Coverage Δ
src/pgtracer/ebpf/collector.py
src/pgtracer/model/__init__.py
src/pgtracer/ebpf/dwarf.py
src/pgtracer/ebpf/unwind.py
src/pgtracer/ebpf/eh_frame_hdr.py
src/pgtracer/model/query.py
src/pgtracer/model/plan.py
src/pgtracer/utils.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yihong0618
Copy link
Contributor Author

upload Codecov seems flanky.

@rdunklau
Copy link
Collaborator

rdunklau commented Nov 3, 2022

Hello, thank you for this PR !

Before I merge it, I have to bring to your attention that we just changed the license to GPL V3. If that is not a problem for you I will merge this.

@yihong0618
Copy link
Contributor Author

merge it, I

No problem! thanks

@rdunklau rdunklau merged commit af3673c into Aiven-Open:main Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ci: GitHub Actions workflow for test and lint can be cleaner
2 participants