Skip to content

Commit a6e6b6f

Browse files
committed
review tests
1 parent 181303b commit a6e6b6f

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

.github/workflows/python-publish.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,51 @@ name: Upload Python Package
66
on:
77
push: {}
88
release:
9-
types: [created]
9+
types: [ created ]
1010

1111
jobs:
1212
quality:
1313
name: Code QA
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
17-
- run: pip install black flake8 isort
18-
- run: black --version
19-
- run: isort --version
20-
- run: flake8 --version
21-
- run: isort --check .
22-
- run: black --check .
23-
- run: flake8 .
16+
- uses: actions/checkout@v2
17+
- run: pip install black flake8 isort
18+
- run: black --version
19+
- run: isort --version
20+
- run: flake8 --version
21+
- run: isort --check .
22+
- run: black --check .
23+
- run: flake8 .
2424

2525
checks:
2626
if: ${{ github.event_name == 'release' }}
2727

2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
platform: ["ubuntu-latest", "macos-latest"]
32-
python-version: ["3.9", "3.10", "3.11" ]
31+
platform: [ "ubuntu-latest", "macos-latest" ]
32+
python-version: [ "3.9", "3.10", "3.11" ]
3333

3434
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
3535
runs-on: ${{ matrix.platform }}
3636
needs: quality
3737

3838
steps:
39-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v2
4040

41-
- uses: actions/setup-python@v2
42-
with:
43-
python-version: ${{ matrix.python-version }}
41+
- uses: actions/setup-python@v2
42+
with:
43+
python-version: ${{ matrix.python-version }}
4444

45-
- name: Install
46-
run: |
47-
pip install pytest
48-
pip install -e .
49-
pip install -r tests/requirements.txt
50-
pip freeze
45+
- name: Install
46+
run: |
47+
pip install pytest
48+
pip install -e .
49+
pip install -r tests/requirements.txt
50+
pip freeze
5151
52-
- name: Tests
53-
run: pytest
52+
- name: Tests
53+
run: env SOURCES_TO_TEST=ecmwf pytest
5454

5555
deploy:
5656

@@ -68,11 +68,11 @@ jobs:
6868

6969
- name: Check that tag version matches code version
7070
run: |
71-
tag=${GITHUB_REF#refs/tags/}
72-
version=$(python setup.py --version)
73-
echo 'tag='$tag
74-
echo "version file="$version
75-
test "$tag" == "$version"
71+
tag=${GITHUB_REF#refs/tags/}
72+
version=$(python setup.py --version)
73+
echo 'tag='$tag
74+
echo "version file="$version
75+
test "$tag" == "$version"
7676
7777
- name: Install dependencies
7878
run: |

tests/test_sources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import pytest
2+
import os
23

34
from ecmwf.opendata import Client
45
from ecmwf.opendata.bufr import count_bufrs
56
from ecmwf.opendata.grib import count_gribs
67

7-
SOURCES = ["ecmwf", "azure", "aws"]
8+
SOURCES = os.getenv("SOURCES_TO_TEST", "ecmwf,azure,aws").split(",")
89

910

1011
@pytest.mark.parametrize("source", SOURCES)

0 commit comments

Comments
 (0)