Skip to content

Commit

Permalink
test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ntessore committed Sep 7, 2024
1 parent 1bf3841 commit 27e52d7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
- main

jobs:

style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run flake8 glass

tests:
name: Tests
runs-on: ubuntu-latest
Expand All @@ -28,12 +30,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install -c .github/test-constraints.txt '.[test]'
- run: pytest --pyargs glass

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run build

docs:
name: Docs
runs-on: ubuntu-latest
Expand All @@ -43,3 +47,15 @@ jobs:
sudo apt-get update
sudo apt-get install pandoc
- run: pipx run --spec '.[docs]' sphinx-build -W -b html docs _build/html

examples:
name: Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- run: pip install '.[examples]'
- run: jupyter execute examples/**/*.ipynb
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ test = [
"scipy",
"fitsio",
]
examples = [
"camb",
"jupyter",
"matplotlib",
]
docs = [
"sphinx",
"furo",
Expand Down

0 comments on commit 27e52d7

Please sign in to comment.