Skip to content

Commit

Permalink
🛀 Revamp CI jobs and outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Mar 23, 2024
1 parent fbf6904 commit 222002d
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,22 @@ jobs:

inspect_distributions:
needs: [style]
name: inspect-${{ matrix.distribution }}-contents
name: inspect-sdist-wheel-contents
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distribution: ["sdist", "wheel"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.12

- name: Build, inspect, and display contents of source distribution (SDist)
if: matrix.distribution == 'sdist'
shell: bash
- name: Build source distribution (SDist) and binary distribution (wheel)
run: |
pipx run build --sdist . --outdir dist/
python -m build --sdist --wheel . --outdir dist/
pipx run twine check dist/* --strict
- name: Build, inspect, and display contents of distributions
shell: bash
run: |
mkdir -p output/sdist
tar -xf dist/*.tar.gz -C output/sdist
Expand All @@ -106,15 +102,8 @@ jobs:
(cd output/sdist && tree -a * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY)
echo -e '\n```\n' >> $GITHUB_STEP_SUMMARY
- name: Build, inspect, and display contents of binary distribution (wheel)
if: matrix.distribution == 'wheel'
shell: bash
run: |
pipx run build --wheel . --outdir wheelhouse/
pipx run twine check wheelhouse/* --strict
mkdir -p output/wheel
pipx run wheel unpack wheelhouse/*.whl -d output/wheel
pipx run wheel unpack dist/*.whl -d output/wheel
echo -e '## View binary distribution (wheel) contents\n' >> $GITHUB_STEP_SUMMARY
echo -e '```\n' >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit 222002d

Please sign in to comment.