diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c5f6ac1..1aa91b3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -6,21 +6,21 @@ name: Upload Python Package on: push: {} release: - types: [created] + types: [ created ] jobs: quality: name: Code QA runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: pip install black flake8 isort - - run: black --version - - run: isort --version - - run: flake8 --version - - run: isort --check . - - run: black --check . - - run: flake8 . + - uses: actions/checkout@v2 + - run: pip install black flake8 isort + - run: black --version + - run: isort --version + - run: flake8 --version + - run: isort --check . + - run: black --check . + - run: flake8 . checks: if: ${{ github.event_name == 'release' }} @@ -28,29 +28,29 @@ jobs: strategy: fail-fast: false matrix: - platform: ["ubuntu-latest", "macos-latest"] - python-version: ["3.9", "3.10", "3.11" ] + platform: [ "ubuntu-latest", "macos-latest" ] + python-version: [ "3.9", "3.10", "3.11" ] name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} runs-on: ${{ matrix.platform }} needs: quality steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} - - name: Install - run: | - pip install pytest - pip install -e . - pip install -r tests/requirements.txt - pip freeze + - name: Install + run: | + pip install pytest + pip install -e . + pip install -r tests/requirements.txt + pip freeze - - name: Tests - run: pytest + - name: Tests + run: env SOURCES_TO_TEST=ecmwf pytest deploy: @@ -68,11 +68,11 @@ jobs: - name: Check that tag version matches code version run: | - tag=${GITHUB_REF#refs/tags/} - version=$(python setup.py --version) - echo 'tag='$tag - echo "version file="$version - test "$tag" == "$version" + tag=${GITHUB_REF#refs/tags/} + version=$(python setup.py --version) + echo 'tag='$tag + echo "version file="$version + test "$tag" == "$version" - name: Install dependencies run: | diff --git a/tests/test_sources.py b/tests/test_sources.py index c98aba3..0b305bc 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -1,10 +1,11 @@ import pytest +import os from ecmwf.opendata import Client from ecmwf.opendata.bufr import count_bufrs from ecmwf.opendata.grib import count_gribs -SOURCES = ["ecmwf", "azure", "aws"] +SOURCES = os.getenv("SOURCES_TO_TEST", "ecmwf,azure,aws").split(",") @pytest.mark.parametrize("source", SOURCES)