Skip to content

Commit

Permalink
test for Python code
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Jun 9, 2024
1 parent cad8d46 commit 676b934
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "ci"

on:
push

jobs:
test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: ['3.9', '3.10', '3.11', '3.12' ]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: ./actions/test
with:
python-version: ${{ matrix.python-version }}
#source-folder: "tests/python"
Empty file added tests/python/__init__.py
Empty file.
9 changes: 8 additions & 1 deletion tests/python/test_trivial.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from cvx.dog import Dog


def test_trivial():
assert True



def test_dog():
dog = Dog(name="Peter Maffay")
assert dog.name == "Peter Maffay"

0 comments on commit 676b934

Please sign in to comment.