Skip to content

Commit f37248a

Browse files
authored
Add downstream checks (#119)
1 parent 449a3e5 commit f37248a

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/downstream.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
pre_job:
14+
# continue-on-error: true # Uncomment once integration is finished
15+
runs-on: ubuntu-latest
16+
# Map a step output to a job output
17+
outputs:
18+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
19+
steps:
20+
- id: skip_check
21+
uses: fkirc/skip-duplicate-actions@v5
22+
test:
23+
needs: pre_job
24+
if: needs.pre_job.outputs.should_skip != 'true'
25+
name: ${{ matrix.package.group }}/${{ matrix.package.repo }}/${{ matrix.julia-version }}
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
fail-fast: true
29+
matrix:
30+
julia-version: ['1']
31+
os: [ubuntu-latest]
32+
package:
33+
- {repo: BlockArrays.jl, group: JuliaArrays}
34+
- {repo: BandedMatrices.jl, group: JuliaLinearAlgebra}
35+
- {repo: BlockBandedMatrices.jl, group: JuliaLinearAlgebra}
36+
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: julia-actions/setup-julia@v1
40+
with:
41+
version: ${{ matrix.julia-version }}
42+
arch: x64
43+
- uses: julia-actions/julia-buildpkg@latest
44+
- name: Clone Downstream
45+
uses: actions/checkout@v3
46+
with:
47+
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }}
48+
path: downstream
49+
- name: Load this and run the downstream tests
50+
shell: julia --color=yes --project=downstream {0}
51+
run: |
52+
using Pkg
53+
try
54+
# force it to use this PR's version of the package
55+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
56+
Pkg.update()
57+
Pkg.test(; coverage = true) # resolver may fail with test time deps
58+
catch err
59+
err isa Pkg.Resolve.ResolverError || rethrow()
60+
# If we can't resolve that means this is incompatible by SemVer and this is fine
61+
# It means we marked this as a breaking change, so we don't need to worry about
62+
# Mistakenly introducing a breaking change, as we have intentionally made one
63+
@info "Not compatible with this release. No problem." exception=err
64+
exit(0) # Exit immediately, as a success
65+
end
66+
- uses: julia-actions/julia-processcoverage@v1
67+
- uses: codecov/codecov-action@v3
68+
with:
69+
files: lcov.info

0 commit comments

Comments
 (0)