Skip to content

Commit

Permalink
ci: Test wheel in minimal venv
Browse files Browse the repository at this point in the history
This would've caught the undeclared setuptools dependency fixed in the
previous commit.

Related: #8
  • Loading branch information
liskin committed Nov 28, 2022
1 parent 15930d4 commit 06a8632
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,33 @@ jobs:
- name: readme
run: make readme

check-wheel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Persistent Github pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'setup.cfg', 'setup.py', 'Makefile') }}
restore-keys: |
pip-${{ runner.os }}-${{ matrix.python-version }}-
pip-${{ runner.os }}-
- name: Build wheel
run: make dist
- name: Install & run wheel
run: |
set -ex
PIP_WHEEL=(/usr/share/python-wheels/pip-*-py3-none-any.whl)
python3 -m venv --without-pip .venv-wheel
.venv-wheel/bin/python "$PIP_WHEEL"/pip install "$PIP_WHEEL"
.venv-wheel/bin/python -m pip install dist/strava_offline-*-py3-none-any.whl
.venv-wheel/bin/strava-offline --help
check-distro:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 06a8632

Please sign in to comment.