Skip to content

Commit f5a8c30

Browse files
authored
Merge pull request #27 from devmotion/dw/downstream
Add downstream tests
2 parents 181c1be + 6750fa7 commit f5a8c30

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/Downstream.yml

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

0 commit comments

Comments
 (0)