diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 988fdd43..4fcaa32e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,8 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # on macos-11 instead of macos-latest, see https://github.com/bancaditalia/black-it/issues/79 + os: [ubuntu-latest, macos-11, windows-latest] python-version: [3.8, 3.9, "3.10", "3.11"] timeout-minutes: 30 @@ -37,14 +38,23 @@ jobs: # env: # ACTIONS_ALLOW_UNSECURE_COMMANDS: true # run: ... - - if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') }} - name: Unit tests and coverage (ubuntu-latest, macos-latest) + - if: matrix.os == 'macos-11' + name: Install dependencies (macos-11) + run: | + # for some reason this seems to be a necessary step for MacOS images, but not for Ubuntu and Windows + brew install hdf5 + brew install c-blosc + # https://stackoverflow.com/questions/73029883/could-not-find-hdf5-installation-for-pytables-on-m1-mac + echo "HDF5_DIR=/usr/local/" >> $GITHUB_ENV + echo "BLOSC_DIR=/usr/local/" >> $GITHUB_ENV + - if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-11') }} + name: Unit tests and coverage (ubuntu-latest, macos-11) run: | pyver=`echo ${{ matrix.python-version }} | tr -d "."` tox -e py${pyver} -- -m 'not e2e' tox -e py${pyver}-nb - - if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') }} - name: Notebook tests (ubuntu-latest, macos-latest) + - if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-11') }} + name: Notebook tests (ubuntu-latest, macos-11) run: | pyver=`echo ${{ matrix.python-version }} | tr -d "."` tox -e py${pyver}-nb