Skip to content

Commit

Permalink
Merge pull request #558 from MetaCell/fix/pygeppetto
Browse files Browse the repository at this point in the history
Update pygeppetto tests and add github action testing it
  • Loading branch information
aranega authored Nov 29, 2024
2 parents 12e850a + 5385288 commit 0a553c2
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
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

0 comments on commit 0a553c2

Please sign in to comment.