Try to export FC and PATH #90
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| run_tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, macos-13] | |
| python-version: [3.11, 3.12, 3.13] | |
| name: "${{ matrix.os }} :: Python ${{ matrix.python-version }}" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Set fortran compiler on macOS | |
| if: runner.os == 'macOS' | |
| run: | | |
| export PATH="$(brew --prefix gfortran)/bin:$PATH" >> $GITHUB_ENV | |
| export FC=$(brew --prefix gfortran)/bin/gfortran >> $GITHUB_ENV | |
| - name: Install package | |
| run: | | |
| echo "The Fortran compiler is $FC" | |
| python -m pip install .[test] -v | |
| - name: Test package | |
| run: python -m pytest |