{"id":22549920,"url":"https://github.com/openmodelica/openmodelica-library-testing-action","last_synced_at":"2026-01-21T04:32:48.673Z","repository":{"id":195780951,"uuid":"693655633","full_name":"OpenModelica/openmodelica-library-testing-action","owner":"OpenModelica","description":"Setup OpenModelicaLibraryTesting scripts and run them on Modelica package and publishes results.","archived":false,"fork":false,"pushed_at":"2025-11-28T11:07:26.000Z","size":7533,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-30T18:40:44.159Z","etag":null,"topics":["actions","continuous-integration","modelica-library","openmodelica"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/openmodelica-library-testing","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenModelica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-19T13:04:38.000Z","updated_at":"2025-11-28T11:07:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7fe15ae-519a-402c-9eb7-683e5161e045","html_url":"https://github.com/OpenModelica/openmodelica-library-testing-action","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"31040c561b0f85ba84be989d11d1813a30d4b01c"},"previous_names":["anheuermann/openmodelica-library-testing-action","openmodelica/openmodelica-library-testing-action"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/OpenModelica/openmodelica-library-testing-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2Fopenmodelica-library-testing-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2Fopenmodelica-library-testing-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2Fopenmodelica-library-testing-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2Fopenmodelica-library-testing-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenModelica","download_url":"https://codeload.github.com/OpenModelica/openmodelica-library-testing-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenModelica%2Fopenmodelica-library-testing-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28626244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","continuous-integration","modelica-library","openmodelica"],"created_at":"2024-12-07T16:10:25.489Z","updated_at":"2026-01-21T04:32:48.659Z","avatar_url":"https://github.com/OpenModelica.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openmodelica-library-testing-action\n\n[![Continuous Integration][ci-badge]][ci-link]\n![TS test coverage](badges/coverage.svg)\n\nThis GitHub action sets [OpenModelicaLibraryTesting][om-library-testing-link]\nscripts up and runs them on a provided Modelica package and returns a summary of\nthe test report.\n\nThe action will set output variables that can be checked how many tests passed\nsimulation and verification. It will fail if at least one test is failing.\n\n## Table of Contents\n\n- [Inputs](#inputs)\n- [Outputs](#outputs)\n- [Example usage](#example-usage)\n- [Artifacts](#artifacts)\n- [Demo](#demo)\n- [Development](#development)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n\n## Inputs\n\n### `library`\n\nName of Modelica package to test.\n\n### `library-version`\n\nVersion of the Modelica package `library` as specified in version\nannotation.\n\n\u003e [!NOTE]\n\u003e Wrap numbers in `'` to ensure parsing them as strings and not a number.\n\u003e\n\u003e ```yml\n\u003e library-version: '1.0'\n\u003e ```\n\n### `modelica-file`\n\nRelative path (from git repository root) to Modelica file containing package to\ntest.\\\nDefault: `'package.mo'`\n\n### `omc-version`\n\nVersion of OpenModelica used for testing.\nAdd [OpenModelica/setup-openmodelica][setup-openmodelica-link]\nto your workflow to setup OpenModelica.\\\nDefault: `'stable'`\n\n### `reference-files-dir`\n\nRelative path (from git repository root) to reference files to compare\nsimulation results to.\\\nDefault: `''`\n\n### `reference-files-extension`\n\nFile extension of result files.\\\nAllowed values: `'mat'`, `'csv'`\\\nDefault: `'mat'`\n\n### `reference-files-delimiter`\n\nCharacter to separate model names in reference files.\nE.g. for `Modelica.Blocks.Examples.PID_Controller.mat` it would be `'.'`\\\nDefault: `'.'`\n\n## Outputs\n\nThe action will fail if one test fails. In addition the following outputs can be\nused to determine the testing results.\n\n### `simulation-tests-passing`\n\n`'True'` if all simulation tests are passing, `'False'` otherwise.\n\n### `n-simulation-passing`\n\nNumber of successful simulation tests.\n\n### `verification-tests-passing`\n\n`'True'` if all verification tests are passing, `'False'` otherwise.\n\n### `n-verification-passing`\n\nNumber of successful verification tests.\n\n## Example usage\n\n```yaml\njobs:\n  library-testing:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Setup Python 3\n        uses: actions/setup-python@v5\n        with:\n          python-version: '3.10'\n\n      - name: Setup OpenModelica\n        uses: OpenModelica/setup-openmodelica@v1\n        with:\n          version: stable\n          packages: |\n            omc\n          libraries: |\n            Modelica 4.0.0\n          omc-diff: true\n\n      - name: openmodelica-library-testing\n        uses: OpenModelica/openmodelica-library-testing-action@v0.2.0\n        with:\n          library: 'MyLibrary'\n          library-version: '2.2.0'\n          modelica-file: 'MyLibrary/package.mo'\n          omc-version: 'stable'\n          reference-files-dir: 'ReferenceFiles'\n          reference-files-extension: 'mat'\n          reference-files-delimiter: '.'\n          pages-root-url: 'https://USERNAME.github.io/REPOSITORY/'\n```\n\n## Artifacts\n\n### HTML Results\n\nDownload the `MyLibrary.html.zip` artifact, unzip it and start a HTML server to\ndisplay the results. This can be used to host results on a server or GitHub\npages.\n\n```bash\nunzip MyLibrary.html.zip -d html\npython -m http.server -d html\n```\n\n#### GitHub Pages\n\nIt's possible to deploy the test results to GitHub pages. On option\n\n```yml\n# [...]\njobs:\n  library-testing:\n    # [...]\n\n  deploy:\n    needs: library-testing\n    permissions:\n      contents: write\n    if: ${{ always() }}\n    concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Get HTML artifact\n        uses: actions/download-artifact@v4\n        with:\n          path: html/\n          pattern: '*.html'\n          merge-multiple: true\n\n      - name: Deploy 🚀\n        uses: JamesIves/github-pages-deploy-action@v4\n        with:\n          folder: html/\n          branch: gh-pages\n```\n\n### SQlite\n\nFor future tests the SQlite data base `sqlite3.db` is archived.\n\n## Demo\n\nThis action tests Modelica library [MyLibrary](examples/MyLibrary/package.mo)\nconsisting of two models from the Modelica Standard Library and compares them to\nreference results in [examples/ReferenceFiles](examples/ReferenceFiles) taken\nfrom\n[https://github.com/modelica/MAP-LIB_ReferenceResults][map-lib-link].\nThe reference results for MyLibrary.Blocks.Examples.PID_Controller are altered\nto check that verification will fail for variables `spring.w_rel`,\n`spring.phi_rel`, `inertia1.w` and `inertia1.phi`.\n\nThe expected output is:\n\n\u003e ## GitHub Actions Test summary\n\u003e\n\u003e ### Summary\n\u003e\n\u003e |    |   Total |   Frontend |   Backend |   SimCode |   Templates |   Compilation |   Simulation |   Verification |\n\u003e |---:|--------:|-----------:|----------:|----------:|------------:|--------------:|-------------:|---------------:|\n\u003e |  0 |       2 |          2 |         2 |         2 |           2 |             2 |            2 |              1 |\n\u003e\n\u003e ### Results\n\u003e\n\u003e |    | Model                                                 | Verified          |   Simulate |   Total buildModel |   Parsing |   Frontend |   Backend |   SimCode |   Templates |   Compile |\n\u003e |---:|:------------------------------------------------------|:------------------|-----------:|-------------------:|----------:|-----------:|----------:|----------:|------------:|----------:|\n\u003e |  0 | MyLibrary.Blocks.Examples.PID_Controller (sim)        | 0.06 (4/7 failed) |       0.03 |               2.46 |      1.86 |       0.23 |      0.03 |      0.01 |        0.03 |      2.16 |\n\u003e |  1 | MyLibrary.Mechanics.MultiBody.Examples.Pendulum (sim) | 0.01 (3 verified) |       0.26 |               3.37 |      1.86 |       0.25 |      0.37 |      0.02 |        0.05 |      2.67 |\n\nThe HTML results can be hosted with GitHub Pages, for this example they can be\nfound at\n[OpenModelica.github.io/openmodelica-library-testing-action][gh-pages-link].\n\n## Development\n\nTo install and build run:\n\n```bash\nnpm install\nnpm run package\n```\n\nTesting will install some Python packages. It's useful to setup a virtual Python\nenvironment in your shell before starting the tests:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\nnpm run test\n```\n\n\u003e [!TIP]\n\u003e On Windows use Conda to choose a Python interpreter and then setup a virtual\n\u003e environment.\n\u003e Use PowerShell to activate `.\\.venv\\Scripts\\activate` the environment.\n\u003e Msys2 doesn't install Python packages via pip, so it won't work with this script.\n\n## License\n\nThis action is licensed with the OSMC Public License v1.8, see\n[OSMC-License.txt](./OSMC-License.txt).\n\n## Acknowledgments\n\nThis package was initially developed by\n[Hochschule Bielefeld - University of Applied Sciences and Arts](hsbi.de)\nas part of the\n[Proper Hybrid Models for Smarter Vehicles (PHyMoS)](https://phymos.de/en/)\nproject, supported by the German\n[Federal Ministry for Economic Affairs and Climate Action][bmwk]\nwith project number `19|200022G`.\n\n[ci-badge]: https://github.com/OpenModelica/openmodelica-library-testing-action/actions/workflows/ci.yml/badge.svg\n[ci-link]: https://github.com/OpenModelica/openmodelica-library-testing-action/actions/workflows/ci.yml\n[om-library-testing-link]: https://github.com/OpenModelica/OpenModelicaLibraryTesting\n[setup-openmodelica-link]: https://github.com/OpenModelica/setup-openmodelica#available-openmodelica-versions\n[map-lib-link]: https://github.com/modelica/MAP-LIB_ReferenceResults/blob/v4.0.0\n[gh-pages-link]: https://openmodelica.github.io/openmodelica-library-testing-action/stable/MyLibrary_tags-v0.2.0/MyLibrary_tags-v0.2.0.html\n[bmwk]: https://www.bmwk.de/Navigation/EN/Home/home.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmodelica%2Fopenmodelica-library-testing-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmodelica%2Fopenmodelica-library-testing-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmodelica%2Fopenmodelica-library-testing-action/lists"}