Skip to content

Commit 94eb605

Browse files
Fix tests on 1.6+ and switch CI to GH actions. (#106)
1 parent cadcb88 commit 94eb605

File tree

4 files changed

+68
-86
lines changed

4 files changed

+68
-86
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
version:
12+
- '1.0'
13+
- '1.5'
14+
- 'nightly'
15+
os:
16+
- ubuntu-latest
17+
- windows-latest
18+
- macos-latest
19+
arch:
20+
- x64
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: julia-actions/setup-julia@v1
24+
with:
25+
version: ${{ matrix.version }}
26+
arch: ${{ matrix.arch }}
27+
show-versioninfo: true
28+
- uses: actions/cache@v1
29+
env:
30+
cache-name: cache-artifacts
31+
with:
32+
path: ~/.julia/artifacts
33+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
34+
restore-keys: |
35+
${{ runner.os }}-test-${{ env.cache-name }}-
36+
${{ runner.os }}-test-
37+
${{ runner.os }}-
38+
- uses: julia-actions/julia-runtest@latest
39+
- uses: julia-actions/julia-processcoverage@v1
40+
- uses: codecov/codecov-action@v1
41+
with:
42+
file: lcov.info
43+
44+
docs:
45+
name: Documentation
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- uses: julia-actions/setup-julia@v1
50+
with:
51+
version: '1.5'
52+
- run: |
53+
julia --project=docs -e '
54+
using Pkg
55+
Pkg.develop(PackageSpec(path=pwd()))
56+
Pkg.instantiate()'
57+
- run: julia --project=docs --color=yes docs/make.jl
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

test/tests.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ end
5252
# .. which should have a single keyword argument, :y
5353
# Base.kwarg_decl returns a Vector{Any} of the keyword arguments.
5454
local kwargs = VERSION < v"1.4.0-DEV.215" ? Base.kwarg_decl(m, typeof(mt.kwsorter)) : Base.kwarg_decl(m)
55-
@test isa(kwargs, Vector{Any})
55+
@test isa(kwargs, Vector)
5656
@test kwargs == [:y]
5757
# Base.kwarg_decl will return a Tuple{} for some reason when called on a method
5858
# that does not have any arguments
@@ -187,10 +187,12 @@ end
187187
DSE.format(DSE.TYPEDSIGNATURES, buf, doc)
188188
str = String(take!(buf))
189189
@test occursin("\n```julia\n", str)
190+
f = str -> replace(str, " " => "")
191+
str = f(str)
190192
if Sys.iswindows()
191-
@test occursin("h_1(x::Union{Array{T,4}, Array{T,3}} where T) -> Union{Array{T,4}, Array{T,3}} where T", str)
193+
@test occursin(f("h_1(x::Union{Array{T,4}, Array{T,3}} where T) -> Union{Array{T,4}, Array{T,3}} where T"), str)
192194
else
193-
@test occursin("h_1(x::Union{Array{T,3}, Array{T,4}} where T) -> Union{Array{T,3}, Array{T,4}} where T", str)
195+
@test occursin(f("h_1(x::Union{Array{T,3}, Array{T,4}} where T) -> Union{Array{T,3}, Array{T,4}} where T"), str)
194196
end
195197
@test occursin("\n```\n", str)
196198

@@ -309,9 +311,11 @@ end
309311
:module => M,
310312
)
311313
DSE.format(DSE.TYPEDSIGNATURES, buf, doc)
314+
f = str -> replace(str, " " => "")
312315
str = String(take!(buf))
316+
str = f(str)
313317
@test occursin("\n```julia\n", str)
314-
@test occursin("\nk_6(x::Array{T<:Number,1}) -> Array{T<:Number,1}\n", str)
318+
@test occursin(f("\nk_6(x::Array{T<:Number,1}) -> Array{T<:Number,1}\n"), str)
315319
@test occursin("\n```\n", str)
316320

317321
doc.data = Dict(

0 commit comments

Comments
 (0)