Skip to content

Commit

Permalink
CI: move testing into virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Sep 18, 2024
1 parent bf10625 commit 486d4af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
12 changes: 0 additions & 12 deletions .github/actions/run-tests/action.yml

This file was deleted.

23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,19 @@ jobs:

- name: Install osmium
run: |
pip install osmium*${PYVER/./}*.whl
pip install virtualenv
virtualenv osmium-test
WHEEL=`ls osmium*${PYVER/./}*.whl`
./osmium-test/bin/pip install ${WHEEL}[tests]
shell: bash
env:
PYVER: ${{ matrix.python-version }}

- uses: ./.github/actions/run-tests

- name: Run tests
run: ./osmium-test/bin/pytest test
shell: bash

build-ubuntu:
build-platform:
runs-on: ${{ matrix.platform }}

strategy:
Expand Down Expand Up @@ -193,7 +197,7 @@ jobs:
if: ${{ matrix.flavour == 'linux' }}

- name: Install packages
run: brew install boost geos lz4
run: brew install boost geos
shell: bash
if: ${{ matrix.flavour == 'macos' }}

Expand Down Expand Up @@ -345,9 +349,14 @@ jobs:

- name: Install osmium
run: |
pip install osmium*${PYVER/./}*.whl
pip install virtualenv
virtualenv osmium-test
WHEEL=`ls osmium*${PYVER/./}*.whl`
./osmium-test/Scripts/pip install ${WHEEL}[tests]
shell: bash
env:
PYVER: ${{ matrix.python-version }}

- uses: ./.github/actions/run-tests
- name: Run tests
run: ./osmium-test/Scripts/pytest test
shell: bash
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def build_extension(self, ext):
python_requires = ">=3.7",
install_requires = ['requests'],
extras_require = {
'tests': ['pytest', 'pytest-httpserver', 'werkzeug'],
'tests': ['pytest', 'pytest-httpserver', 'werkzeug', 'shapely'],
},
cmdclass=dict(build_ext=CMakeBuild, sdist=Pyosmium_sdist),
zip_safe=False,
Expand Down

0 comments on commit 486d4af

Please sign in to comment.