diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f554154..f42c54c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,8 @@ jobs: name: test-${{ matrix.tox-env }} (Python${{ matrix.python-version }}) needs: lint runs-on: ubuntu-latest + env: + ESMF_VERSION: "v8.5.0" strategy: matrix: include: @@ -58,6 +60,17 @@ jobs: python-version: "3.11" steps: - uses: actions/checkout@v4.1.1 + - name: Install NetCDF + run: | + sudo apt-get -y update + sudo apt install libnetcdf-dev libnetcdff-dev + - name: Install ESMF + uses: esmf-org/install-esmf-action@v1 + env: + ESMF_NETCDF: nc-config + with: + cache: true + version: ${{ env.ESMF_VERSION }} - name: Set up Python${{ matrix.python-version }} uses: actions/setup-python@v4.7.1 with: @@ -68,11 +81,12 @@ jobs: - name: Test with tox run: | tox -e ${{ matrix.tox-env }} -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }} -# COVERALLS_PARALLEL: true -# COVERALLS_SERVICE_NAME: github + env: + ESMF_VERSION: ${{ env.ESMF_VERSION }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }} + COVERALLS_PARALLEL: true + COVERALLS_SERVICE_NAME: github # test-conda: # name: Test with Python${{ matrix.python-version }} (Anaconda) diff --git a/tox.ini b/tox.ini index b963aae..9d0d230 100644 --- a/tox.ini +++ b/tox.ini @@ -39,12 +39,15 @@ setenv = passenv = CI COVERALLS_* + ESMFMKFILE + ESMF_VERSION GITHUB_* extras = dev download = True install_command = python -m pip install --no-user {opts} {packages} deps = + git+https://github.com/esmf-org/esmf.git@{env:ESMF_VERSION}\#subdirectory=src/addon/esmpy ; If you want to make tox run the tests with the same versions, create a ; requirements.txt with the pinned versions and uncomment the following line: ; -r{toxinidir}/requirements.txt