Skip to content

Commit 1d3e065

Browse files
authored
add downstream tests (#78)
1 parent 0c44ad1 commit 1d3e065

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/downstream.yml

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

0 commit comments

Comments
 (0)