Skip to content

Commit 1aee97d

Browse files
committed
Run integration tests in a temporary environment
This avoids making ChainRulesCore a dependency of the downstream package, which can cause Aqua failures.
1 parent 7e199f3 commit 1aee97d

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/IntegrationTest.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,39 @@ on:
77

88
jobs:
99
test:
10-
name: ${{ matrix.package.repo }}
10+
name: ${{ matrix.package.name }}
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
julia-version: [1]
1616
os: [ubuntu-latest]
1717
package:
18-
- {user: JuliaDiff, repo: ChainRules.jl}
19-
- {user: JuliaMath, repo: SpecialFunctions.jl}
20-
- {user: invenia, repo: BlockDiagonals.jl}
18+
- {user: JuliaDiff, name: ChainRules}
19+
- {user: JuliaMath, name: SpecialFunctions}
20+
- {user: invenia, name: BlockDiagonals}
2121
steps:
2222
- uses: actions/checkout@v2
2323
- uses: julia-actions/setup-julia@v1
2424
with:
2525
version: ${{ matrix.julia-version }}
2626
arch: x64
27+
- uses: julia-actions/cache@v3
2728
- uses: julia-actions/julia-buildpkg@latest
2829
- name: Clone Downstream
2930
uses: actions/checkout@v2
3031
with:
31-
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
32+
repository: ${{ matrix.package.user }}/${{ matrix.package.name }}.jl
3233
path: downstream
3334
- name: Load this and run the downstream tests
34-
shell: julia --project=downstream {0}
35+
shell: julia --project=@temp {0}
3536
run: |
3637
using Pkg
3738
try
3839
# force it to use this PR's version of the package
39-
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
40+
Pkg.develop([PackageSpec(path="."), PackageSpec(path="downstream")]) # resolver may fail with main deps
4041
Pkg.update()
41-
Pkg.test() # resolver may fail with test time deps
42+
Pkg.test("${{ matrix.package.name }}") # resolver may fail with test time deps
4243
catch err
4344
err isa Pkg.Resolve.ResolverError || rethrow()
4445
# If we can't resolve that means this is incompatible by SemVer and this is fine

0 commit comments

Comments
 (0)