From a4b1af77898e1529256aa192f0d56e8fa545d0b4 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Fri, 15 Jan 2021 19:11:35 +0000 Subject: [PATCH 1/4] Do more reverse dependency tests --- .../workflows/IntegrationTestChainRules.yml | 48 +++++++++++++++---- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/IntegrationTestChainRules.yml b/.github/workflows/IntegrationTestChainRules.yml index 5b7d047a7..5ae983639 100644 --- a/.github/workflows/IntegrationTestChainRules.yml +++ b/.github/workflows/IntegrationTestChainRules.yml @@ -1,18 +1,28 @@ -name: IntegrationTestChainRules +name: IntegrationTest on: push: branches: [master] tags: [v*] - pull_request: + pull_request jobs: test: - name: Julia v${{ matrix.julia-version }} - ${{ matrix.os }} + name: ${{ matrix.package.repo }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: julia-version: [1] os: [ubuntu-latest] + package: + - {user: JuliaDiff, repo: ChainRules.jl} + - {user: JuliaMath, repo: SpecialFunctions.jl} + - {user: invenia, repo: BlockDiagonals.jl} + - {user: invenia, repo: PDMatsExtras.jl} + - {user: chrisbrahms, repo: Hankel.jl} + - {user: SciML, repo: DiffEqBase.jl} + - {user: dfdx, repo: Yota.jl} + steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 @@ -20,11 +30,31 @@ jobs: version: ${{ matrix.julia-version }} arch: x64 - uses: julia-actions/julia-buildpkg@latest - - name: Clone ChainRules + - name: Clone Downstream uses: actions/checkout@v2 with: - repository: JuliaDiff/ChainRules.jl - path: "ChainRules.jl" - - name: Run the tests - run: julia --project="ChainRules.jl" -e "using Pkg; Pkg.develop(PackageSpec(path=\"./\")); Pkg.update(); Pkg.test()" - shell: bash + repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} + path: downstream + - name: Load this and run the downstream tests + shell: julia --project=downstream {0} + run: | + using Pkg + try + # force it to use this PR's version of the package + Pkg.develop(PackageSpec(path=".")) + Pkg.update() + catch err + err isa Pkg.Resolve.ResolverError || rethrow() + # If we can't resolve that means this is incompatible by SemVer and this is fine + # It means we marked this as a breaking change, so we don't need to worry about + # Mistakenly introducing a breaking change, as we have intentionally made one + + # Note: this doesn't solve all resolver errors, e.g. might be a mutual dependency + # of this package and a test only dependency of the downstream packagem that are + # incompatible. And this check only catches resolution failures with main dependencies + # (plus this package itself) with this package + + @info "Not compatible with this release. No problem." exception=err + exit(0) # Exit immediately, as a success + end + Pkg.test() From 73e24683ff0b91b4a78d1a83f4f99a6cc113e281 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Fri, 15 Jan 2021 19:13:05 +0000 Subject: [PATCH 2/4] Update .github/workflows/IntegrationTestChainRules.yml --- .github/workflows/IntegrationTestChainRules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/IntegrationTestChainRules.yml b/.github/workflows/IntegrationTestChainRules.yml index 5ae983639..881d4b574 100644 --- a/.github/workflows/IntegrationTestChainRules.yml +++ b/.github/workflows/IntegrationTestChainRules.yml @@ -3,7 +3,7 @@ on: push: branches: [master] tags: [v*] - pull_request + pull_request: jobs: test: From 9a74ceb085006d10ec8e2ee1b4607030142467b5 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Mon, 18 Jan 2021 12:03:03 +0000 Subject: [PATCH 3/4] Update .github/workflows/IntegrationTestChainRules.yml Co-authored-by: mattBrzezinski --- .github/workflows/IntegrationTestChainRules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/IntegrationTestChainRules.yml b/.github/workflows/IntegrationTestChainRules.yml index 881d4b574..1ed00de91 100644 --- a/.github/workflows/IntegrationTestChainRules.yml +++ b/.github/workflows/IntegrationTestChainRules.yml @@ -55,6 +55,6 @@ jobs: # (plus this package itself) with this package @info "Not compatible with this release. No problem." exception=err - exit(0) # Exit immediately, as a success + exit(0) # Exit immediately, as a success end Pkg.test() From 773ea6252d014c219af137d4cf18181aed32aab4 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Mon, 18 Jan 2021 12:07:53 +0000 Subject: [PATCH 4/4] Also handle test dep incompat --- .github/workflows/IntegrationTestChainRules.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/IntegrationTestChainRules.yml b/.github/workflows/IntegrationTestChainRules.yml index 1ed00de91..ae61d5a7e 100644 --- a/.github/workflows/IntegrationTestChainRules.yml +++ b/.github/workflows/IntegrationTestChainRules.yml @@ -41,20 +41,15 @@ jobs: using Pkg try # force it to use this PR's version of the package - Pkg.develop(PackageSpec(path=".")) + Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps Pkg.update() + Pkg.test() # resolver may fail with test time deps catch err err isa Pkg.Resolve.ResolverError || rethrow() # If we can't resolve that means this is incompatible by SemVer and this is fine # It means we marked this as a breaking change, so we don't need to worry about # Mistakenly introducing a breaking change, as we have intentionally made one - # Note: this doesn't solve all resolver errors, e.g. might be a mutual dependency - # of this package and a test only dependency of the downstream packagem that are - # incompatible. And this check only catches resolution failures with main dependencies - # (plus this package itself) with this package - @info "Not compatible with this release. No problem." exception=err exit(0) # Exit immediately, as a success end - Pkg.test()