Skip to content

Commit

Permalink
TST: split provider testing to a separate job (#171)
Browse files Browse the repository at this point in the history
* TST: split provider testing to a separate job

* keep same triggers

* drop linting
  • Loading branch information
martinfleis authored Jun 6, 2024
1 parent 4528771 commit 8d66f88
Show file tree
Hide file tree
Showing 4 changed files with 594 additions and 555 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/test_providers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test providers

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: "59 23 * * 3"

jobs:
provider_testing:
name: Test providers
runs-on: ubuntu-latest
timeout-minutes: 120
env:
THUNDERFOREST: ${{ secrets.THUNDERFOREST }}
JAWG: ${{ secrets.JAWG }}
MAPBOX: ${{ secrets.MAPBOX }}
MAPTILER: ${{ secrets.MAPTILER }}
TOMTOM: ${{ secrets.TOMTOM }}
OPENWEATHERMAP: ${{ secrets.OPENWEATHERMAP }}
HEREV3: ${{ secrets.HEREV3 }}
STADIA: ${{ secrets.STADIA }}
defaults:
run:
shell: bash -l {0}

steps:
- name: checkout repo
uses: actions/checkout@v4

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/latest.yaml
micromamba-version: "latest"

- name: Install xyzservices
run: pip install .


- name: test providers - bash
run: pytest -v . -m request --cov=xyzservices --cov-append --cov-report term-missing --cov-report xml --color=yes -n auto

- uses: codecov/codecov-action@v4
13 changes: 0 additions & 13 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
environment-file: [ci/latest.yaml]
env:
THUNDERFOREST: ${{ secrets.THUNDERFOREST }}
JAWG: ${{ secrets.JAWG }}
MAPBOX: ${{ secrets.MAPBOX }}
MAPTILER: ${{ secrets.MAPTILER }}
TOMTOM: ${{ secrets.TOMTOM }}
OPENWEATHERMAP: ${{ secrets.OPENWEATHERMAP }}
HEREV3: ${{ secrets.HEREV3 }}
STADIA: ${{ secrets.STADIA }}
defaults:
run:
shell: bash -l {0}
Expand All @@ -56,10 +47,6 @@ jobs:
- name: run tests - bash
run: pytest -v . -m "not request" --cov=xyzservices --cov-append --cov-report term-missing --cov-report xml --color=yes

- name: test providers - bash
run: pytest -v . -m request --cov=xyzservices --cov-append --cov-report term-missing --cov-report xml --color=yes -n auto
if: matrix.os == 'ubuntu-latest'

- name: remove JSON from share and test fallback
run: |
python -c 'import os, sys; os.remove(os.path.join(sys.prefix, "share", "xyzservices", "providers.json"))'
Expand Down
4 changes: 3 additions & 1 deletion provider_sources/_compress_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"JusticeMap.white",
"JusticeMap.plurality",
"Esri.DeLorme",
"NASAGIBS.ModisTerraChlorophyll"
"NASAGIBS.ModisTerraChlorophyll",
"HEREv3.trafficFlow",
"Stadia.AlidadeSatellite",
]

with open("./leaflet-providers-parsed.json") as f:
Expand Down
Loading

0 comments on commit 8d66f88

Please sign in to comment.