From bbca5aec0a74cd1b795c2e05f114d5b9dd78e8e3 Mon Sep 17 00:00:00 2001 From: SorooshMani-NOAA Date: Thu, 23 Feb 2023 17:19:54 -0500 Subject: [PATCH] Add hdf5 and netcdf installation for macos test env --- .github/workflows/tests.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a3eed19..34ad1d37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,11 +61,18 @@ jobs: with: path: ${{ env.pythonLocation }} key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - - name: install dependencies + - name: install linux dependencies run: | sudo apt install libhdf5-dev sudo apt install libnetcdf-dev - pip install ".[testing]" + if: runner.os == 'Linux' + - name: install macos dependencies + run: | + brew install hdf5 + brew install netcdf + if: runner.os == 'macOS' + - name: install repo + run: pip install ".[testing]" - name: run tests run: pytest --numprocesses auto test_with_coverage: @@ -83,11 +90,18 @@ jobs: with: path: ${{ env.pythonLocation }} key: test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} - - name: install dependencies + - name: install linux dependencies run: | sudo apt install libhdf5-dev sudo apt install libnetcdf-dev - pip install ".[testing]" + if: runner.os == 'Linux' + - name: install macos dependencies + run: | + brew install hdf5 + brew install netcdf + if: runner.os == 'macOS' + - name: install repo + run: pip install ".[testing]" - name: run tests with coverage run: pytest --numprocesses auto --cov . --cov-report xml:coverage.xml - name: show coverage report