Skip to content

Commit 7df446b

Browse files
authored
Downstream test against ApproxFun (#191)
1 parent 28cfeeb commit 7df446b

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/downstream.yml

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

0 commit comments

Comments
 (0)