Skip to content

Commit 6883d9d

Browse files
authored
Simplify downstream package integration CI action (#809)
* Update downstream package CI action
1 parent c6e57b4 commit 6883d9d

File tree

1 file changed

+25
-36
lines changed

1 file changed

+25
-36
lines changed

.github/workflows/CI.yml

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ jobs:
7777
with:
7878
file: lcov.info
7979

80-
MAT-integration:
81-
name: MAT.jl - julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
80+
integration:
81+
name: ${{ matrix.package.repo }} - julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
8282
runs-on: ${{ matrix.os }}
8383
strategy:
8484
fail-fast: false
@@ -89,49 +89,38 @@ jobs:
8989
- ubuntu-latest
9090
arch:
9191
- x64
92+
package:
93+
- {user: JuliaIO, repo: MAT.jl}
94+
- {user: JuliaIO, repo: JLD.jl}
9295
steps:
9396
- uses: actions/checkout@v2
9497
- uses: julia-actions/setup-julia@latest
9598
with:
9699
version: ${{ matrix.version }}
97100
arch: ${{ matrix.arch }}
98101
- uses: julia-actions/julia-buildpkg@latest
99-
- name: Clone MAT.jl
102+
- name: Clone ${{ matrix.package.repo }}
100103
uses: actions/checkout@v2
101104
with:
102-
repository: JuliaIO/MAT.jl
103-
path: "MAT.jl"
104-
- name: Run the tests
105-
run: julia --project="MAT.jl" -e "using Pkg; Pkg.develop(PackageSpec(path=\"./\")); Pkg.update(); Pkg.test()"
106-
shell: bash
107-
108-
JLD-integration:
109-
name: JLD.jl - julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
110-
runs-on: ${{ matrix.os }}
111-
strategy:
112-
fail-fast: false
113-
matrix:
114-
version:
115-
- '1'
116-
os:
117-
- ubuntu-latest
118-
arch:
119-
- x64
120-
steps:
121-
- uses: actions/checkout@v2
122-
- uses: julia-actions/setup-julia@latest
123-
with:
124-
version: ${{ matrix.version }}
125-
arch: ${{ matrix.arch }}
126-
- uses: julia-actions/julia-buildpkg@latest
127-
- name: Clone JLD.jl
128-
uses: actions/checkout@v2
129-
with:
130-
repository: JuliaIO/JLD.jl
131-
path: "JLD.jl"
132-
- name: Run the tests
133-
run: julia --project="JLD.jl" -e "using Pkg; Pkg.develop(PackageSpec(path=\"./\")); Pkg.update(); Pkg.test()"
134-
shell: bash
105+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
106+
path: downstream
107+
- name: Run ${{ matrix.package.repo }} tests
108+
shell: julia --project=downstream {0}
109+
run: |
110+
using Pkg
111+
try
112+
# force it to use this PR's version of the package
113+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
114+
Pkg.update()
115+
Pkg.test() # resolver may fail with test time deps
116+
catch err
117+
err isa Pkg.Resolve.ResolverError || rethrow()
118+
# If we can't resolve that means this is incompatible by SemVer and this is fine
119+
# It means we marked this as a breaking change, so we don't need to worry about
120+
# Mistakenly introducing a breaking change, as we have intentionally made one
121+
@info "Not compatible with this release. No problem." exception=err
122+
exit(0) # Exit immediately, as a success
123+
end
135124
136125
docs:
137126
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)