Skip to content

Commit 1580cbd

Browse files
add IntegrationTest.yml
1 parent 2851867 commit 1580cbd

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/IntegrationTest.yml

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

0 commit comments

Comments
 (0)