Skip to content

Commit 6a63fde

Browse files
authored
try to add integration tests
1 parent 4c3fbe2 commit 6a63fde

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/Downstream.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Compatibility
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
paths-ignore:
7+
- 'LICENSE'
8+
- 'README.md'
9+
- '.github/workflows/TagBot.yml'
10+
11+
concurrency:
12+
group: build-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
pre_job:
17+
# continue-on-error: true # Uncomment once integration is finished
18+
runs-on: ubuntu-latest
19+
# Map a step output to a job output
20+
outputs:
21+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
22+
steps:
23+
- id: skip_check
24+
uses: fkirc/skip-duplicate-actions@v5
25+
test:
26+
needs: pre_job
27+
if: needs.pre_job.outputs.should_skip != 'true'
28+
name: ${{ matrix.package.group }}/${{ matrix.package.repo }}/${{ matrix.julia-version }}
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: true
32+
matrix:
33+
julia-version: ['1']
34+
os: [ubuntu-latest]
35+
package:
36+
- {repo: BandedMatrices.jl, group: JuliaLinearAlgebra}
37+
- {repo: CircularArrays.jl, group: Vexatos}
38+
- {repo: ClassicalOrthogonalPolynomials.jl, group: JuliaApproximation}
39+
- {repo: ContinuumArrays.jl, group: JuliaApproximation}
40+
- {repo: InfiniteArrays.jl, group: JuliaArrays}
41+
- {repo: IntervalSets.jl, group: JuliaMath}
42+
- {repo: QuasiArrays.jl, group: JuliaApproximation}
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: julia-actions/setup-julia@v1
47+
with:
48+
version: ${{ matrix.julia-version }}
49+
arch: x64
50+
- uses: julia-actions/julia-buildpkg@latest
51+
- name: Clone Downstream
52+
uses: actions/checkout@v4
53+
with:
54+
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }}
55+
path: downstream
56+
- name: Load this and run the downstream tests
57+
shell: julia --color=yes --project=downstream {0}
58+
run: |
59+
using Pkg
60+
try
61+
# force it to use this PR's version of the package
62+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
63+
Pkg.update()
64+
Pkg.test(; coverage = true) # resolver may fail with test time deps
65+
catch err
66+
err isa Pkg.Resolve.ResolverError || rethrow()
67+
# If we can't resolve that means this is incompatible by SemVer and this is fine
68+
# It means we marked this as a breaking change, so we don't need to worry about
69+
# Mistakenly introducing a breaking change, as we have intentionally made one
70+
@info "Not compatible with this release. No problem." exception=err
71+
exit(0) # Exit immediately, as a success
72+
end
73+
- uses: julia-actions/julia-processcoverage@v1
74+
- uses: codecov/codecov-action@v3
75+
with:
76+
files: lcov.info

0 commit comments

Comments
 (0)