Skip to content

Commit

Permalink
split unit test and testing tutorial notebooks
Browse files Browse the repository at this point in the history
Both tests can be done in parallel and speed up the github actions time
  • Loading branch information
xgarrido committed Feb 26, 2024
1 parent 285497d commit de74c4f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Testing tutorial notebooks

on:
pull_request:
push:
branches: [master]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies via pip
run: |
python -m pip install --upgrade pip
python -m pip install .[notebook]
- name: Test notebooks
run: |
cd docs/source/notebooks
make
9 changes: 1 addition & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Testing
name: Testing & coverage

on:
pull_request:
Expand Down Expand Up @@ -41,10 +41,3 @@ jobs:
- name: Report Coverage (codecov)
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4

- name: Test notebooks (Only on Linux for saving time)
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.11') }}
run: |
python -m pip install .[notebook]
cd docs/source/notebooks
make
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [

[project.optional-dependencies]
test = ["pytest", "pytest-cov", "camb"]
notebook = ["jupyter", "seaborn", "latex2mathml"]
notebook = ["jupyter", "camb", "seaborn", "latex2mathml"]

[project.urls]
Homepage = "https://github.com/simonsobs/LAT_MFLike"
Expand Down

0 comments on commit de74c4f

Please sign in to comment.