Skip to content

Commit

Permalink
Add pytest dev dependency (#1)
Browse files Browse the repository at this point in the history
* Add pytest dev dependency

* Added github workflow to run pytest

* Added a simple test case as an example

* Added .gitignore and .dockerignore

* Fixed MyPy issue in example test

---------

Co-authored-by: David van Buiten <[email protected]>
  • Loading branch information
4c0n and vanbuiten authored Jan 31, 2024
1 parent 4e1e685 commit 2db986e
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__
.idea/
README.md
Dockerfile
docker
docker-compose.yml
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests
on: [pull_request]

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build containers
run: docker-compose build meldingen-core

- name: Test
run: docker-compose run --rm meldingen-core pytest -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__pycache__/
.idea/
58 changes: 52 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ python = "^3.12"
isort = "^5.13.2"
mypy = "^1.8.0"
black = "^23.12.1"
pytest = "^8.0.0"
mkdocstrings = {version = "^0.24.0", extras = ["python"]}
mkdocs-material = "^9.5.6"
mkdocs-literate-nav = "^0.6.1"
Expand Down
2 changes: 2 additions & 0 deletions tests/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_assert_true() -> None:
assert True

0 comments on commit 2db986e

Please sign in to comment.