Skip to content

Commit c90e0bd

Browse files
authored
Merge pull request #61 from JuliaDiff/mcabbott-patch-1
Add integration tests
2 parents 42b11d0 + 14ca2a6 commit c90e0bd

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/downstream.yml

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

0 commit comments

Comments
 (0)