Skip to content

Commit 1842505

Browse files
authored
Merge pull request #380 from FluxML/bc/downstream-ci
Add downstream reverse CI
2 parents ba04d97 + 6e798cb commit 1842505

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/Downstream.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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: FluxML, repo: Flux.jl, group: All}
21+
- {user: denizyuret, repo: Knet.jl, group: All}
22+
- {user: dfdx, repo: Avalon.jl, group: All}
23+
- {user: JuliaOptimalTransport, repo: OptimalTransport.jl, group: All}
24+
steps:
25+
- uses: actions/checkout@v2
26+
# for OptimalTransport.jl
27+
- name: Install python
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: '3.9'
31+
architecture: ${{ matrix.arch }}
32+
# for OptimalTransport.jl
33+
- run: python -m pip install pot
34+
- uses: julia-actions/setup-julia@v1
35+
with:
36+
version: ${{ matrix.julia-version }}
37+
arch: x64
38+
- uses: julia-actions/julia-buildpkg@latest
39+
- name: Clone Downstream
40+
uses: actions/checkout@v2
41+
with:
42+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
43+
path: downstream
44+
- name: Load this and run the downstream tests
45+
shell: julia --color=yes --project=downstream {0}
46+
run: |
47+
using Pkg
48+
try
49+
# force it to use this PR's version of the package
50+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
51+
Pkg.update()
52+
Pkg.test() # resolver may fail with test time deps
53+
catch err
54+
err isa Pkg.Resolve.ResolverError || rethrow()
55+
# If we can't resolve that means this is incompatible by SemVer and this is fine
56+
# It means we marked this as a breaking change, so we don't need to worry about
57+
# Mistakenly introducing a breaking change, as we have intentionally made one
58+
@info "Not compatible with this release. No problem." exception=err
59+
exit(0) # Exit immediately, as a success
60+
end

0 commit comments

Comments
 (0)