From a824dfb0c278eab268bcc7e806e14f4b3b15b154 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Fri, 3 Nov 2023 16:13:51 +0000 Subject: [PATCH] use condat activate --- .github/workflows/conda-pytest.yaml | 3 +++ .github/workflows/pytest.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/conda-pytest.yaml b/.github/workflows/conda-pytest.yaml index 1f5eb64..70424d1 100644 --- a/.github/workflows/conda-pytest.yaml +++ b/.github/workflows/conda-pytest.yaml @@ -11,11 +11,14 @@ jobs: - name: Install the repo run: | + conda create -n test python=3.10 -y + conda activate test conda install -c conda-forge xesmf esmpy -y export ESMFMKFILE='/usr/share/miniconda/lib/esmf.mk' pip install -e . - name: run pytest run: | + conda activate test which python python -m pytest diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..13058a7 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,18 @@ +name: Python package tests + +on: + push: + schedule: + - cron: "0 12 * * 1" +jobs: + call-run-python-tests: + uses: openclimatefix/.github/.github/workflows/python-test.yml@main + with: + # 0 means don't use pytest-xdist + pytest_numcpus: "4" + # pytest-cov looks at this folder + pytest_cov_dir: "pvnet_app" + # extra things to install + sudo_apt_install: "libgeos++-dev libproj-dev proj-data proj-bin esmf" + # brew_install: "proj geos librttopo" + os_list: '["ubuntu-latest"]'