Skip to content

Commit 690c6d6

Browse files
ci: run MTK tests in CI
1 parent 2689e8a commit 690c6d6

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: "Test ModelingToolkit"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
push:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- 'docs/**'
14+
- 'benchmark/**'
15+
16+
concurrency:
17+
# Skip intermediate builds: always, but for the master branch.
18+
# Cancel intermediate builds: always, but for the master branch.
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
21+
22+
jobs:
23+
tests:
24+
name: "Tests"
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
version:
29+
- "1"
30+
- "lts"
31+
- "pre"
32+
group:
33+
- InterfaceI
34+
- InterfaceII
35+
- Initialization
36+
- SymbolicIndexingInterface
37+
- Extensions
38+
- Downstream
39+
- FMI
40+
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
41+
steps:
42+
- uses: actions/checkout@v6
43+
- name: "Setup Julia ${{ matrix.version }}"
44+
uses: julia-actions/setup-julia@v2
45+
with:
46+
version: "${{ matrix.version }}"
47+
arch: "${{ runner.arch }}"
48+
- uses: julia-actions/cache@v2
49+
if: ${{ vars.USE_SELF_HOSTED != 'true' }}
50+
with:
51+
token: "${{ secrets.GITHUB_TOKEN }}"
52+
- name: Clone ModelingToolkit
53+
uses: actions/checkout@v6
54+
with:
55+
repository: SciML/ModelingToolkit.jl
56+
path: downstream
57+
- name: "Test ModelingToolkit/${{ matrix.group }}"
58+
env:
59+
GROUP: ${{ matrix.group }}
60+
JULIA_PKG_PRECOMPILE_AUTO: 0
61+
shell: julia --color=yes --check-bounds=yes --depwarn=yes --project=downstream {0}
62+
run: |
63+
using Pkg
64+
@info "dev StateSelection.jl"
65+
Pkg.develop(; path = ".")
66+
@info "dev ModelingToolkitTearing.jl"
67+
Pkg.develop(; path = "lib/ModelingToolkitTearing")
68+
Pkg.test("ModelingToolkit")
69+
- uses: julia-actions/julia-processcoverage@v1
70+
with:
71+
directories: "src,lib/ModelingToolkitTearing/src"
72+
- name: "Report Coverage with Codecov"
73+
uses: codecov/codecov-action@v5
74+
with:
75+
files: lcov.info
76+
token: "${{ secrets.CODECOV_TOKEN }}"
77+
fail_ci_if_error: true

0 commit comments

Comments
 (0)