Skip to content

Commit 8f56f20

Browse files
authored
Add Aqua.jl as a CI job (#148)
1 parent 3eda167 commit 8f56f20

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

.github/workflows/aqua.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: aqua-lint
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: julia-actions/setup-julia@latest
13+
with:
14+
version: '1'
15+
- uses: actions/checkout@v1
16+
- name: Aqua
17+
shell: julia --color=yes {0}
18+
run: |
19+
using Pkg
20+
Pkg.add(PackageSpec(name="Aqua"))
21+
Pkg.develop(PackageSpec(path=pwd()))
22+
using MutableArithmetics, Aqua
23+
# Skip ambiguity test for now
24+
Aqua.test_all(MutableArithmetics; ambiguities = false)

src/Test/config.jl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@ macro test_suite(setname, subsets = false)
77
runtest = :(f(args...))
88
end
99
return esc(
10-
:(
11-
function $testname(
12-
args...;
13-
exclude::Vector{String} = String[],
14-
) where {T}
15-
for (name, f) in $testdict
16-
if name in exclude
17-
continue
18-
end
19-
@testset "$name" begin
20-
$runtest
21-
end
10+
:(function $testname(args...; exclude::Vector{String} = String[])
11+
for (name, f) in $testdict
12+
if name in exclude
13+
continue
14+
end
15+
@testset "$name" begin
16+
$runtest
2217
end
2318
end
24-
),
19+
end),
2520
)
2621
end

src/interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function operate(
180180
return op(x, y, args...)
181181
end
182182

183-
operate(op::Union{typeof(-),typeof(/)}, x, y) where {N} = op(x, y)
183+
operate(op::Union{typeof(-),typeof(/)}, x, y) = op(x, y)
184184

185185
operate(::typeof(convert), ::Type{T}, x) where {T} = convert(T, x)
186186

0 commit comments

Comments
 (0)