bloomberg / pystack

🔍 🐍 Like pstack but for Python!
https://bloomberg.github.io/pystack
Apache License 2.0
1.01k stars 45 forks source link

Update `upload-artifact` and `download-artifact` #161

Closed sarahmonod closed 8 months ago

sarahmonod commented 9 months ago

Replace #160 which was failing because of breaking changes in v4.

codecov-commenter commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6e3dd1e) 89.76% compared to head (a892112) 89.71%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #161 +/- ## ========================================== - Coverage 89.76% 89.71% -0.06% ========================================== Files 48 48 Lines 5532 5532 Branches 880 880 ========================================== - Hits 4966 4963 -3 - Misses 566 569 +3 ``` | [Flag](https://app.codecov.io/gh/bloomberg/pystack/pull/161/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/bloomberg/pystack/pull/161/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `75.07% <ø> (-0.14%)` | :arrow_down: | | [python_and_cython](https://app.codecov.io/gh/bloomberg/pystack/pull/161/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `99.84% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sarahmonod commented 9 months ago

To the reviewer(s):

  1. I haven't tested aarch64 at all because I can't think of a reason why it wouldn't work. Let me know if you want a test similar to the one I'm describing below.
  2. I've changed upload_pypi to run unconditionally so that you can check that the dist/ directory contains the right things. Once you're convinced it works as expected, we can apply the following patch to make it run only under the appropriate circumstances:
diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml
index 750306a..23be339 100644
--- a/.github/workflows/build_wheels.yml
+++ b/.github/workflows/build_wheels.yml
@@ -306,6 +306,7 @@ jobs:
   upload_pypi:
     needs: [test_wheels]
     runs-on: ubuntu-latest
+    if: github.event_name == 'release' && github.event.action == 'published'
     steps:
       - uses: actions/download-artifact@v4
         with:
@@ -315,4 +316,7 @@ jobs:
           mv dist/sdist/*.tar.gz dist/
           mv dist/wheels-*/*.whl dist/
           rmdir dist/{sdist,wheels-*}
-      - run: ls -R dist
+      - uses: pypa/gh-action-pypi-publish@release/v1
+        with:
+          skip_existing: true
+          password: ${{ secrets.PYPI_PASSWORD }}
sarahmonod commented 8 months ago

Closing in favor of #163