Skip to content

Commit f2f2163

Browse files
committed
Make tests version dependent, test 1.0 and nightly
1 parent cba9dae commit f2f2163

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
version:
16+
- '1.0'
1617
- '1.3'
1718
- '1'
18-
# - 'nightly'
19+
- 'nightly'
1920
os:
2021
- ubuntu-latest
2122
- macOS-latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Ratios = "0.3, 0.4"
2323
Requires = "1.1"
2424
StaticArrays = "0.12, 1"
2525
WoodburyMatrices = "0.4, 0.5"
26-
julia = "1.3"
26+
julia = "1"
2727

2828
[extras]
2929
DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"

test/chainrules.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@ using Zygote
88

99
itp = interpolate(y,BSpline(Linear()))
1010

11-
@test Zygote.gradient(itp, 1)[1] == Interpolations.gradient(itp, 1)
11+
if VERSION v"1.3"
12+
@test Zygote.gradient(itp, 1)[1] == Interpolations.gradient(itp, 1)
13+
else
14+
@test_skip Zygote.gradient(itp, 1)[1] == Interpolations.gradient(itp, 1)
15+
end
1216

1317
# 2D example
1418
x2 = [i*j for i=1:5, j=1:5]
1519
y2 = sin.(x2)
1620

1721
itp2 = interpolate(y2, BSpline(Cubic(Line(OnGrid()))))
18-
@test Zygote.gradient(itp2,1,2)[1] == Interpolations.gradient(itp2,1,2)
22+
23+
if VERSION v"1.3"
24+
@test Zygote.gradient(itp2,1,2)[1] == Interpolations.gradient(itp2,1,2)
25+
else
26+
@test_skip Zygote.gradient(itp2,1,2)[1] == Interpolations.gradient(itp2,1,2)
27+
end
1928
end

0 commit comments

Comments
 (0)