Skip to content

Commit fcf7858

Browse files
devmotiongdalle
andauthored
Add downstream tests (#34)
* Add downstream tests * Apply suggestions from code review Co-authored-by: Guillaume Dalle <[email protected]> --------- Co-authored-by: Guillaume Dalle <[email protected]>
1 parent 91614bb commit fcf7858

File tree

1 file changed

+57
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)