Skip to content

Commit

Permalink
Merge pull request #2371 from rcomer/no-network-ci
Browse files Browse the repository at this point in the history
TST: add configuration for no-network tests
  • Loading branch information
greglucas committed Apr 26, 2024
2 parents e9bef0c + 2b4b0e8 commit 631a8db
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,15 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, '3.10', '3.11', '3.12']
shapely-dev: [false]
use-network: [true]
include:
- os: ubuntu-latest
python-version: '3.11'
shapely-dev: true
use-network: true
- os: ubuntu-latest
python-version: '3.11'
use-network: false

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,6 +73,7 @@ jobs:
- name: Testing
id: test
if: matrix.use-network
# we need to force bash to use line continuations on Windows
shell: bash
run: |
Expand All @@ -82,6 +88,15 @@ jobs:
--mpl-results-path="cartopy_test_output-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.shapely-dev }}" \
--pyargs cartopy ${EXTRA_TEST_ARGS}
- name: No Network Tests
# Ensure any test that needs network access has been marked as such
if: ${{ ! matrix.use-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 631a8db

Please sign in to comment.