From 9c4cc2afba550dc65a7738b66d2db576993b2589 Mon Sep 17 00:00:00 2001 From: devsjc Date: Tue, 26 Sep 2023 13:53:54 +0100 Subject: [PATCH] Update ci --- .github/workflows/ci.yml | 17 ++++++++++------- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60f14b3..b62f305 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,10 @@ concurrency: jobs: # Define a dependencies job that runs on all branches and PRs # * Installs dependencies and caches them - build-venv: +build-venv: runs-on: ubuntu-latest + container: quay.io/condaforge/miniforge3:latest + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -38,16 +40,17 @@ jobs: # Should mirror the build-venv stage in the Containerfile - name: Build venv run: | - sudo apt -qq update && sudo apt -qq install -y build-essential libgeos-dev - python -m venv ./venv - ./venv/bin/pip install --upgrade -q pip wheel setuptools + apt -qq update && apt -qq install -y build-essential + conda create -p ./venv python=3.10 + ./venv/bin/python -m pip install --upgrade -q pip wheel setuptools if: steps.restore-cache.outputs.cache-hit != 'true' # Should mirror the build-reqs stage in the Containerfile # * Except this installs the dev dependencies and binaries as well - name: Install all dependencies run: | - ./venv/bin/pip install -q --no-binary=dags .[dev] + conda install -p ./venv -q -y eccodes zarr + ./venv/bin/python -m pip install -q .[dev] if: steps.restore-cache.outputs.cache-hit != 'true' # Cache the virtualenv for future runs @@ -56,8 +59,8 @@ jobs: with: path: ./venv key: ${{ steps.restore-cache.outputs.cache-primary-key }} - if: steps.restore-cache.outputs.cache-hit != 'true' - + if: steps.restore-cache.outputs.cache-hit != 'true +' # Define a unittest job that runs on all branches and PRs test-unit: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index eae6acf..d81fe28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ dependencies = [ "dagster-docker == 0.20.11", "huggingface-hub == 0.16.4", "numpy >= 1.23.0", - "nwp-consumer >= 0.1.17", + "nwp-consumer == 0.1.17", "ocf-blosc2 == 0.0.3", "pathlib == 1.0.1", "requests >= 2.28.0",