diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 4dfd0d9..3d9f2c4 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -42,6 +42,9 @@ jobs: name: Package tests and smoke models, Julia 1.13 runs-on: ubuntu-latest timeout-minutes: 120 + permissions: + contents: write # the coverage badge file on gh-pages + actions: write # julia-actions/cache deletes the caches it replaces env: JULIA_PKG_PRECOMPILE_AUTO: "0" # One thread: OMLibraryTesting runs no parallel workloads. @@ -71,7 +74,22 @@ jobs: - name: Package tests working-directory: OM.jl/OMLibraryTesting.jl - run: julia --color=yes --project=. -e 'using Pkg; Pkg.test()' + # coverage of the package's directory only (Pkg.test's --code-coverage=@) + run: julia --color=yes --project=. -e 'using Pkg; Pkg.test(; coverage = true)' + + - uses: julia-actions/julia-processcoverage@v1 + with: + directories: OM.jl/OMLibraryTesting.jl/src + + # The package tests' coverage in the job summary and, on master, coverage.json on gh-pages for the README's + # badge (no external service; the action is shared by the OM.jl packages). The smoke models run without it. + - name: Coverage + uses: JKRT/OM.jl/.github/actions/coverage@master + with: + name: OMLibraryTesting.jl/src + label: code coverage + path: OM.jl/OMLibraryTesting.jl + publish: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - name: Reference data of the smoke models working-directory: OM.jl/OMLibraryTesting.jl/reference diff --git a/Project.toml b/Project.toml index d49f02b..3122a35 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "OMLibraryTesting" uuid = "4866894a-ca78-4bef-9a5c-0d35f2f81ce1" -version = "0.4.3" +version = "0.4.4" authors = ["John Tinnerholm "] [deps] @@ -21,9 +21,9 @@ OMFrontend = { path = "../OMFrontend.jl" } [compat] julia = "1.13" -OM = "0.10, 0.11, 0.12" -OMBackend = "0.9, 0.10, 0.11, 0.12" -OMFrontend = "2" +OM = "0.10, 0.11, 0.12, 0.13, 0.14" +OMBackend = "0.9, 0.10, 0.11, 0.12, 1" +OMFrontend = "2, 3" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/README.md b/README.md index 1287959..46f088c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![MSL coverage](https://img.shields.io/endpoint?url=https%3A%2F%2Fopenmodelica.github.io%2FOMLibraryTesting.jl%2Fbadge.json)](https://openmodelica.github.io/OMLibraryTesting.jl/) [![MSL 4.1.0 coverage](https://img.shields.io/endpoint?url=https%3A%2F%2Fopenmodelica.github.io%2FOMLibraryTesting.jl%2Fmsl-4.1.0%2Fbadge.json)](https://openmodelica.github.io/OMLibraryTesting.jl/msl-4.1.0/) +[![Code coverage](https://img.shields.io/endpoint?url=https://openmodelica.github.io/OMLibraryTesting.jl/coverage.json)](https://github.com/OpenModelica/OMLibraryTesting.jl/actions/workflows/smoke.yml?query=branch%3Amaster) A Julia package for running MSL (Modelica Standard Library) coverage tests against [OM.jl](https://github.com/OpenModelica/OM.jl). It auto-discovers all experiment models in the MSL using `omc`, runs each through the OM.jl pipeline (flatten -> translate -> simulate -> validate), and generates HTML coverage reports.