forked from JuliaPlots/Plots.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from daschw/github-actions
switch to github-actions and update runtests.jl to run Plots test images
- Loading branch information
Showing
4 changed files
with
91 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |