Skip to content

Commit dec3c28

Browse files
authored
Merge pull request #62 from aplavin/patch-2
add downstream CI
2 parents a869b6f + 498eea8 commit dec3c28

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.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+
pull_request:
5+
6+
jobs:
7+
test:
8+
name: ${{ matrix.package.repo }}/${{ matrix.julia-version }}
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
julia-version: [1.6, 1, nightly]
14+
os: [ubuntu-latest]
15+
package:
16+
- {repo: JuliaObjects/Accessors.jl}
17+
- {repo: JuliaFolds/BangBang.jl}
18+
- {repo: jw3126/Setfield.jl}
19+
- {repo: rafaqz/Flatten.jl}
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: julia-actions/setup-julia@v1
23+
with:
24+
version: ${{ matrix.julia-version }}
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.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(coverage=true) # 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
49+
- uses: julia-actions/julia-processcoverage@v1
50+
- uses: codecov/codecov-action@v1
51+
with:
52+
file: lcov.info

0 commit comments

Comments
 (0)