Skip to content

Commit bc7074a

Browse files
authored
Merge pull request #260 from jishnub/downstream
Test against downstream packages
2 parents 5817ff3 + 31949c6 commit bc7074a

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/downstream.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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: BlockBandedMatrices.jl, group: JuliaLinearAlgebra}
34+
- {repo: InfiniteLinearAlgebra.jl, group: JuliaLinearAlgebra}
35+
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: julia-actions/setup-julia@v1
39+
with:
40+
version: ${{ matrix.julia-version }}
41+
arch: x64
42+
- uses: julia-actions/julia-buildpkg@latest
43+
- name: Clone Downstream
44+
uses: actions/checkout@v3
45+
with:
46+
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }}
47+
path: downstream
48+
- name: Load this and run the downstream tests
49+
shell: julia --color=yes --project=downstream {0}
50+
run: |
51+
using Pkg
52+
try
53+
# force it to use this PR's version of the package
54+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
55+
Pkg.update()
56+
Pkg.test() # resolver may fail with test time deps
57+
catch err
58+
err isa Pkg.Resolve.ResolverError || rethrow()
59+
# If we can't resolve that means this is incompatible by SemVer and this is fine
60+
# It means we marked this as a breaking change, so we don't need to worry about
61+
# Mistakenly introducing a breaking change, as we have intentionally made one
62+
@info "Not compatible with this release. No problem." exception=err
63+
exit(0) # Exit immediately, as a success
64+
end
65+
- uses: julia-actions/julia-processcoverage@v1
66+
- uses: codecov/codecov-action@v3
67+
with:
68+
files: lcov.info

0 commit comments

Comments
 (0)