Skip to content

Commit a3213be

Browse files
authored
Add MTK to downstream tests (#169)
1 parent 6d1399e commit a3213be

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/Downstream.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: IntegrationTest
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }}
11+
runs-on: ${{ matrix.os }}
12+
env:
13+
GROUP: ${{ matrix.package.group }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
julia-version: [1,1.6]
18+
os: [ubuntu-latest]
19+
package:
20+
- {user: SciML, repo: ModelingToolkit.jl}
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: julia-actions/setup-julia@v1
24+
with:
25+
version: ${{ matrix.julia-version }}
26+
arch: x64
27+
- uses: julia-actions/julia-buildpkg@latest
28+
- name: Clone Downstream
29+
uses: actions/checkout@v3
30+
with:
31+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
32+
path: downstream
33+
- name: Load this and run the downstream tests
34+
shell: julia --color=yes --project=downstream {0}
35+
run: |
36+
using Pkg
37+
try
38+
# force it to use this PR's version of the package
39+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
40+
Pkg.update()
41+
Pkg.test(coverage=true) # resolver may fail with test time deps
42+
catch err
43+
err isa Pkg.Resolve.ResolverError || rethrow()
44+
# If we can't resolve that means this is incompatible by SemVer and this is fine
45+
# It means we marked this as a breaking change, so we don't need to worry about
46+
# Mistakenly introducing a breaking change, as we have intentionally made one
47+
@info "Not compatible with this release. No problem." exception=err
48+
exit(0) # Exit immediately, as a success
49+
end
50+
- uses: julia-actions/julia-processcoverage@v1
51+
- uses: codecov/codecov-action@v3
52+
with:
53+
file: lcov.info

0 commit comments

Comments
 (0)