Skip to content

Commit

Permalink
Merge pull request #66 from daschw/github-actions
Browse files Browse the repository at this point in the history
switch to github-actions and update runtests.jl to run Plots test images
  • Loading branch information
daschw authored Oct 28, 2020
2 parents e378872 + 22cc594 commit d1f1f4b
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 82 deletions.
79 changes: 52 additions & 27 deletions RecipesPipeline/.github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
name: CI
name: ci

on: [push]
on:
push:
pull_request:

defaults:
run:
shell: bash

jobs:
test:
CI:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
GKS_ENCODING: "utf8"

name: Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
matrix:
julia-version: [1.4]
julia-arch: [x64]
os: [ubuntu-latest, macOS-latest]
fail-fast: false
matrix:
version:
- '1'
- 'nightly'
os:
- ubuntu-latest
- windows-latest
- macos-latest
arch:
- x64
# - x86

steps:
- uses: actions/[email protected]

- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}

- name: Add package versions
run: julia --project=temp_for_test -e 'using Pkg; pkg"dev .; add https://github.com/JuliaPlots/MakieRecipes.jl; add CairoMakie#master"'

- name: Run tests
# uses: julia-actions/julia-runtest@master
run: julia --project=temp_for_test -e 'using Pkg; pkg"test RecipesPipeline"'

- name: Upload test images
uses: actions/[email protected]
# Setup environment
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
name: Recordings
path: ./test
if: always()

version: ${{ matrix.version }}
- name: Cache artifacts
uses: actions/cache@v1
env:
Expand All @@ -45,4 +49,25 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
if: always()
# TESTCMD
- name: Default TESTCMD
run: echo ::set-env name=TESTCMD::"julia"
- name: Ubuntu TESTCMD
if: startsWith(matrix.os,'ubuntu')
run: echo ::set-env name=TESTCMD::"xvfb-run --auto-servernum julia"

# Julia Dependencies
- name: Install Julia dependencies
uses: julia-actions/julia-buildpkg@latest

# Run tests
- name: Run tests
run: $TESTCMD --project -e 'using Pkg; Pkg.test(coverage=true);'

Skip:
if: "contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: Skip CI 🚫
run: echo skip ci
37 changes: 0 additions & 37 deletions RecipesPipeline/.travis.yml

This file was deleted.

27 changes: 14 additions & 13 deletions RecipesPipeline/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ RecipesBase = "0.8, 1.0"
julia = "1"

[extras]
AbstractPlotting = "537997a7-5e4e-5d89-9595-2241ea00577e"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503"
MakieRecipes = "3c562d8e-4afa-4f1c-99bf-ad54af2b207f"
MarketData = "945b72a4-3b13-509d-9b46-1525bb5c06de"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimeSeries = "9e3dc215-6440-5c97-bce1-76c03772f85e"
Phylo = "aea672f4-3940-5932-aa44-993d1c3ff149"
GraphRecipes = "bd48cda9-67a9-57be-86fa-5b3c104eda73"

[targets]
test = ["Test", "AbstractPlotting", "CairoMakie", "OrdinaryDiffEq",
"StochasticDiffEq", "DiffEqNoiseProcess",
"MakieRecipes", "MarketData", "TimeSeries", "Phylo", "GraphRecipes"]
test = ["Distributions", "FileIO", "GeometryBasics", "Images", "ImageMagick", "OffsetArrays", "Plots", "Random", "RDatasets", "SparseArrays", "StaticArrays", "Statistics", "StatsPlots", "Test"]
30 changes: 25 additions & 5 deletions RecipesPipeline/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
using Distributions
using FileIO
using GeometryBasics
using ImageMagick
using Images
using OffsetArrays
using Plots
using Random
using RecipesPipeline
using RDatasets
using SparseArrays
using StaticArrays
using Statistics
using StatsPlots
using Test

makie_test_dir = joinpath(@__DIR__, "test_makie")
mkpath(makie_test_dir)
# makie_test_dir = joinpath(@__DIR__, "test_makie")
# mkpath(makie_test_dir)

@testset "RecipesPipeline.jl" begin
@testset "Makie integration" begin cd(makie_test_dir) do
include("makie.jl")
end end
# @testset "Makie integration" begin cd(makie_test_dir) do
# include("makie.jl")
# end end
@testset "Plots tests" begin
for i in eachindex(Plots._examples)
if i Plots._backend_skips[:gr]
@test Plots.test_examples(:gr, i, disp=false) isa Plots.Plot
end
end
end
end

0 comments on commit d1f1f4b

Please sign in to comment.