Skip to content

Commit

Permalink
TST: add configuration for no-network tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed Apr 13, 2024
1 parent e9bef0c commit 7e1c9df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci-testing.yml
Expand Up @@ -13,10 +13,16 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, '3.10', '3.11', '3.12']
shapely-dev: [false]
no-network: [false]
include:
- os: ubuntu-latest
python-version: '3.11'
shapely-dev: true
no-network: false
- os: ubuntu-latest
python-version: '3.11'
shapely-dev: false
no-network: true

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,6 +74,7 @@ jobs:
- name: Testing
id: test
if: ${{ ! matrix.no-network }}
# we need to force bash to use line continuations on Windows
shell: bash
run: |
Expand All @@ -82,6 +89,14 @@ jobs:
--mpl-results-path="cartopy_test_output-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.shapely-dev }}" \
--pyargs cartopy ${EXTRA_TEST_ARGS}
- name: No Network Tests
if: matrix.no-network
run: |
pip install pytest-socket
pytest -rfEsX -n 4 \
--color=yes \
--pyargs cartopy -m "not natural_earth and not network" --disable-socket
- name: Coveralls
if: steps.coverage.conclusion == 'success'
env:
Expand Down

0 comments on commit 7e1c9df

Please sign in to comment.