Bump actions/checkout from 3 to 4 #155
Workflow file for this run
This file contains 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: Testing | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set gfortran link on macos-latest | |
if: matrix.os == 'macos-latest' | |
run: | | |
set -x | |
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran | |
gfortran --version | |
- name: Install dependencies via pip | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade pytest pytest-cov | |
python -m pip install . | |
- name: Unit tests | |
run: | | |
python -m pip install camb | |
python -m pytest -vv mflike --cov=mflike --cov-report=xml:coverage.xml | |
- name: Report Coverage (codecov) | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
- name: Test notebooks (Only on Linux for saving time) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
python -m pip install jupyter | |
jupyter nbconvert --to notebook --execute notebooks/mflike_tutorial.ipynb |