Skip to content

Commit a377e7b

Browse files
authored
Downstream tests (#165)
1 parent ae057af commit a377e7b

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.github/workflows/downstream.yml

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

0 commit comments

Comments
 (0)