Skip to content

Commit

Permalink
Add testing infrastructure (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha authored Apr 3, 2024
1 parent c3de7c8 commit ba7b963
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: continuous-integration
on:
push:
branches:
- main
pull_request:

jobs:
test-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Check out repository
uses: actions/checkout@v4

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

- name: Install package and its dependencies
run: python3 -m pip install -e .[dev]

- name: Run pytest
run: pytest -v --cov --cov-report json
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ requires-python = ">=3.9"
dependencies = [
"ase",
]

[project.optional-dependencies]
dev = [
"bumpver==2023.1129",
"pre-commit==3.6.0",
"pytest==7.4.4",
"pytest-cov==4.1.0",
]
6 changes: 6 additions & 0 deletions tests/test_cube.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from cubehandler import Cube


def test_empty_cube():
cube = Cube()
assert cube is not None

0 comments on commit ba7b963

Please sign in to comment.