Skip to content

Commit ee3bf7b

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 3b7ac6d commit ee3bf7b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/IntegrationTest.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ 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: ChainRulesTestUtils.jl}
19-
- {user: JuliaDiff, repo: ChainRules.jl}
20-
- {user: JuliaMath, repo: SpecialFunctions.jl}
21-
- {user: invenia, repo: BlockDiagonals.jl}
22-
- {user: invenia, repo: PDMatsExtras.jl}
23-
- {user: PumasAI, repo: DataInterpolations.jl}
18+
- {user: JuliaDiff, name: ChainRulesTestUtils}
19+
- {user: JuliaDiff, name: ChainRules}
20+
- {user: JuliaMath, name: SpecialFunctions}
21+
- {user: invenia, name: BlockDiagonals}
22+
- {user: invenia, name: PDMatsExtras}
23+
- {user: PumasAI, name: DataInterpolations}
2424

2525
steps:
2626
- uses: actions/checkout@v4
@@ -32,17 +32,18 @@ jobs:
3232
- name: Clone Downstream
3333
uses: actions/checkout@v4
3434
with:
35-
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
35+
repository: ${{ matrix.package.user }}/${{ matrix.package.name }}.jl
3636
path: downstream
3737
- name: Load this and run the downstream tests
38-
shell: julia --project=downstream {0}
38+
shell: julia --project=@temp {0}
3939
run: |
4040
using Pkg
41+
Pkg.develop(PackageSpec(path="."))
4142
try
4243
# force it to use this PR's version of the package
43-
Pkg.develop(PackageSpec(path=".")) # ResolverError with main deps may be thrown here
44+
Pkg.develop(PackageSpec(path="downstream")) # ResolverError with main deps may be thrown here
4445
Pkg.update()
45-
Pkg.test() # ResolverError with test deps may be thrown here (before test process starts)
46+
Pkg.test("${{ matrix.package.name }}") # ResolverError with test deps may be thrown here (before test process starts)
4647
catch err
4748
err isa Pkg.Resolve.ResolverError || rethrow()
4849
# If we can't resolve that means this is incompatible by SemVer and this is fine

0 commit comments

Comments
 (0)