Skip to content

Commit 1c575b7

Browse files
authored
Add integration tests (#87)
1 parent c66b8c9 commit 1c575b7

File tree

1 file changed

+48
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)