Skip to content

Commit 69c29a1

Browse files
authored
switch to GitHub Actions (#157)
* switch to GitHub Actions * update printing * update badge
1 parent 6d816d8 commit 69c29a1

File tree

4 files changed

+79
-45
lines changed

4 files changed

+79
-45
lines changed

.github/workflows/CI.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- '1.0'
19+
- '1'
20+
- 'nightly'
21+
os:
22+
- ubuntu-latest
23+
- windows-latest
24+
- macos-latest
25+
arch:
26+
- x64
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: julia-actions/setup-julia@v1
30+
with:
31+
version: ${{ matrix.version }}
32+
arch: ${{ matrix.arch }}
33+
- uses: actions/cache@v1
34+
env:
35+
cache-name: cache-artifacts
36+
with:
37+
path: ~/.julia/artifacts
38+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
39+
restore-keys: |
40+
${{ runner.os }}-test-${{ env.cache-name }}-
41+
${{ runner.os }}-test-
42+
${{ runner.os }}-
43+
- uses: julia-actions/julia-buildpkg@v1
44+
- uses: julia-actions/julia-runtest@v1
45+
- uses: julia-actions/julia-processcoverage@v1
46+
- uses: codecov/codecov-action@v1
47+
with:
48+
file: lcov.info

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# StructArrays
22

3-
[![Build Status](https://travis-ci.org/JuliaArrays/StructArrays.jl.svg?branch=master)](https://travis-ci.org/JuliaArrays/StructArrays.jl)
3+
[![CI](https://github.com/JuliaArrays/StructArrays.jl/workflows/CI/badge.svg?branch=master)](https://github.com/JuliaArrays/StructArrays.jl/actions?query=workflow%3ACI+branch%3Amaster)
44
[![codecov.io](http://codecov.io/github/JuliaArrays/StructArrays.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaArrays/StructArrays.jl?branch=master)
55

66
This package introduces the type `StructArray` which is an `AbstractArray` whose elements are `struct` (for example `NamedTuples`, or `ComplexF64`, or a custom user defined `struct`). While a `StructArray` iterates `structs`, the layout is column based (meaning each field of the `struct` is stored in a separate `Array`).

test/runtests.jl

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -628,12 +628,19 @@ end
628628
io = IOBuffer()
629629
Base.showarg(io, rows, true)
630630
str = String(take!(io))
631-
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2}) with eltype LazyRow{Complex{Float64}}"
631+
if VERSION < v"1.6-"
632+
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2}) with eltype LazyRow{Complex{Float64}}"
633+
else
634+
@test str == "LazyRows(::Matrix{Float64}, ::Matrix{Float64}) with eltype LazyRow{ComplexF64}"
635+
end
632636
io = IOBuffer()
633637
Base.showarg(io, rows, false)
634638
str = String(take!(io))
635-
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2})"
636-
639+
if VERSION < v"1.6-"
640+
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2})"
641+
else
642+
@test str == "LazyRows(::Matrix{Float64}, ::Matrix{Float64})"
643+
end
637644
s = StructArray((rand(10, 10), rand(10, 10)))
638645
rows = LazyRows(s)
639646
@test IndexStyle(rows) isa IndexLinear
@@ -653,11 +660,19 @@ end
653660
io = IOBuffer()
654661
Base.showarg(io, rows, true)
655662
str = String(take!(io))
656-
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2}) with eltype LazyRow{Tuple{Float64,Float64}}"
663+
if VERSION < v"1.6-"
664+
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2}) with eltype LazyRow{Tuple{Float64,Float64}}"
665+
else
666+
@test str == "LazyRows(::Matrix{Float64}, ::Matrix{Float64}) with eltype LazyRow{Tuple{Float64, Float64}}"
667+
end
657668
io = IOBuffer()
658669
Base.showarg(io, rows, false)
659670
str = String(take!(io))
660-
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2})"
671+
if VERSION < v"1.6-"
672+
@test str == "LazyRows(::Array{Float64,2}, ::Array{Float64,2})"
673+
else
674+
@test str == "LazyRows(::Matrix{Float64}, ::Matrix{Float64})"
675+
end
661676
end
662677

663678
@testset "refarray" begin
@@ -687,11 +702,19 @@ end
687702
io = IOBuffer()
688703
Base.showarg(io, s, true)
689704
str = String(take!(io))
690-
@test str == "StructArray(::Array{Int64,1}, ::Array{Int64,1}) with eltype Complex{Int64}"
705+
if VERSION < v"1.6-"
706+
@test str == "StructArray(::Array{Int64,1}, ::Array{Int64,1}) with eltype Complex{Int64}"
707+
else
708+
@test str == "StructArray(::Vector{Int64}, ::Vector{Int64}) with eltype Complex{Int64}"
709+
end
691710
io = IOBuffer()
692711
Base.showarg(io, s, false)
693712
str = String(take!(io))
694-
@test str == "StructArray(::Array{Int64,1}, ::Array{Int64,1})"
713+
if VERSION < v"1.6-"
714+
@test str == "StructArray(::Array{Int64,1}, ::Array{Int64,1})"
715+
else
716+
@test str == "StructArray(::Vector{Int64}, ::Vector{Int64})"
717+
end
695718
end
696719

697720
@testset "append!!" begin

0 commit comments

Comments
 (0)