Skip to content

Commit ca14884

Browse files
authored
Merge pull request #194 from JuliaStats/dw/downstream
Add downstream tests
2 parents c130649 + 0e7f906 commit ca14884

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Diff for: .github/workflows/IntegrationTest.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: IntegrationTest
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
tags: '*'
11+
12+
concurrency:
13+
# Skip intermediate builds: always.
14+
# Cancel intermediate builds: only if it is a pull request build.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
18+
jobs:
19+
test:
20+
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
julia-version: [1]
26+
os: [ubuntu-latest]
27+
package:
28+
- {user: JuliaStats, repo: Distributions.jl}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: julia-actions/setup-julia@v1
33+
with:
34+
version: ${{ matrix.julia-version }}
35+
arch: x64
36+
- uses: julia-actions/julia-buildpkg@v1
37+
- name: Clone Downstream
38+
uses: actions/checkout@v4
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)