Skip to content

Commit 9dc13e6

Browse files
authored
Merge pull request #64 from ReactiveBayes/63-create-integrationtestyml
#63 Add IntegrationTest.yml
2 parents 341ec3b + 096c100 commit 9dc13e6

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test dependent packages
2+
3+
# Based on https://github.com/SciML/SciMLBase.jl/blob/master/.github/workflows/Downstream.yml
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
jobs:
13+
test:
14+
name: ${{ matrix.package.repo }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
julia-version: ['1']
20+
os: [ubuntu-latest]
21+
package:
22+
# Add downstream packages that depend on ExponentialFamilyProjection here
23+
# Each entry runs as a separate parallel job
24+
- { user: ReactiveBayes, repo: ReactiveMP.jl }
25+
- { user: ReactiveBayes, repo: RxInfer.jl }
26+
27+
steps:
28+
- uses: actions/checkout@v5
29+
30+
- uses: julia-actions/setup-julia@v2
31+
with:
32+
version: ${{ matrix.julia-version }}
33+
arch: x64
34+
35+
- uses: julia-actions/julia-buildpkg@v1
36+
37+
- name: Clone Downstream
38+
uses: actions/checkout@v5
39+
with:
40+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
41+
path: downstream
42+
43+
- name: Load this and run the downstream tests
44+
shell: julia --project=downstream {0}
45+
run: |
46+
using Pkg
47+
try
48+
# Force downstream to use this PR version of ExponentialFamilyProjection
49+
Pkg.develop(PackageSpec(path=".")) # add this version
50+
Pkg.update()
51+
Pkg.test() # run downstream tests
52+
catch err
53+
err isa Pkg.Resolve.ResolverError || rethrow()
54+
# If resolver fails, assume intentional breaking change (SemVer)
55+
@info "Not compatible with this release. No problem." exception=err
56+
exit(0) # Treat as success
57+
end

0 commit comments

Comments
 (0)