Skip to content

Commit 1718c0b

Browse files
authored
Automatically test for downstream breakage (#99)
* Automatically test for downstream breakage * don't test on julia v1.6
1 parent 4b4634f commit 1718c0b

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
name: CI
22
on:
3-
- push
4-
- pull_request
3+
create:
4+
tags:
5+
push:
6+
branches:
7+
- master
8+
paths-ignore:
9+
- 'LICENSE'
10+
- 'README.md'
11+
- '.github/workflows/TagBot.yml'
12+
pull_request:
13+
paths-ignore:
14+
- 'LICENSE'
15+
- 'README.md'
16+
- '.github/workflows/TagBot.yml'
517
jobs:
618
test:
719
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}

.github/workflows/downstream.yml

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

0 commit comments

Comments
 (0)