Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start implementing smoke testing #40

Merged
merged 4 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,26 @@ jobs:
# echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
# pipx run nox -s pylint

# Where there's smoke, there's fire!
smoke:
name: Smoke tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install package
run: python -m pip install ".[test]"
- name: Run smoke test
run: python -m pytest tests/smoke -ra

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
needs: [pre-commit]
needs: [pre-commit, smoke]
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ filterwarnings = [
]
log_cli_level = "INFO"
testpaths = [
"tests",
"tests/",
"docs",
"src/galax",
]


Expand Down
Empty file added tests/smoke/__init__.py
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions tests/smoke/dynamics/mockstream/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Testing :mod:`galax.dynamics.mockstream` module."""

from galax.dynamics import mockstream


def test_all():
"""Test the `galax.dynamics.mockstream` API."""
assert set(mockstream.__all__) == set(
mockstream._df.__all__ + mockstream._mockstream_generator.__all__
)
10 changes: 10 additions & 0 deletions tests/smoke/dynamics/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Testing :mod:`galax.dynamics` module."""

import galax.dynamics as gd


def test_all():
"""Test the `galax.potential` API."""
assert set(gd.__all__) == set(
gd._core.__all__ + gd._orbit.__all__ + gd.mockstream.__all__
)
Empty file.
10 changes: 10 additions & 0 deletions tests/smoke/integrate/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Test the :mod:`galax.integrate` module."""

from galax import integrate


def test_all():
"""Test the API."""
assert set(integrate.__all__) == set(
integrate._base.__all__ + integrate._builtin.__all__
)
Empty file.
File renamed without changes.
Empty file added tests/smoke/utils/__init__.py
Empty file.
File renamed without changes.