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

Update pygeppetto tests and add github action testing it #558

Merged
merged 8 commits into from
Nov 29, 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
30 changes: 30 additions & 0 deletions .github/workflows/pygeppetto-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pygeppetto tests

on: [push]

jobs:
build-test:
defaults:
run:
working-directory: pygeppetto
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "pypy-3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
pip install -r requirements-test.txt
pip install -e .
- name: Test with pytest
run: |
pytest
6 changes: 3 additions & 3 deletions pygeppetto/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==4.6.2
pytest-cov==2.7.1
tox==3.12.1
pytest
pytest-cov
tox
responses
8 changes: 5 additions & 3 deletions pygeppetto/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup, find_packages

__version__ = "0.8.1"
__version__ = "0.9.0"

required_packages = [
'pyecore>=0.11.5',
Expand Down Expand Up @@ -31,8 +31,10 @@
classifiers=[
"Programming Language :: Python",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development",
Expand Down
14 changes: 6 additions & 8 deletions pygeppetto/tests/test_xmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ def filepath(filename):
return os.path.join(HERE, 'xmi-data', filename)




def test_read_mediumXMI(rset):
resource = rset.get_resource(URI(filepath('MediumNet.net.nml.xmi')))
root = resource.contents[0]
assert root # The root exists

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_read_BigXMI(rset):
resource = rset.get_resource(URI(filepath('BigCA1.net.nml.xmi')))
root = resource.contents[0]
assert root # The root exists

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_read_LargeXMI(rset):
resource = rset.get_resource(URI(filepath('LargeConns.net.nml.xmi')))
root = resource.contents[0]
Expand All @@ -41,14 +39,14 @@ def test_readwrite_mediumXMI(tmpdir, rset):
f = tmpdir.mkdir('pyecore-tmp').join('medium.xmi')
resource.save(output=URI(str(f)))

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_readwrite_BigXMI(tmpdir, rset):
resource = rset.get_resource(URI(filepath('BigCA1.net.nml.xmi')))
root = resource.contents[0]
f = tmpdir.mkdir('pyecore-tmp').join('big.xmi')
resource.save(output=URI(str(f)))

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_readwrite_LargeXMI(tmpdir, rset):
resource = rset.get_resource(URI(filepath('LargeConns.net.nml.xmi')))
root = resource.contents[0]
Expand All @@ -73,7 +71,7 @@ def test_roundtrip_mediumXMI(tmpdir, rset):
assert root
assert root.name == 'mediumTestModel'

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_roundtrip_BigXMI(tmpdir, rset):
resource = rset.get_resource(URI(filepath('BigCA1.net.nml.xmi')))
root = resource.contents[0]
Expand All @@ -91,7 +89,7 @@ def test_roundtrip_BigXMI(tmpdir, rset):
assert root
assert root.name == 'bigTestModel'

@pytest.mark.skip('Too slow')
# @pytest.mark.skip('Too slow')
def test_roundtrip_LargeXMI(tmpdir, rset):
resource = rset.get_resource(URI(filepath('LargeConns.net.nml.xmi')))
root = resource.contents[0]
Expand Down