diff --git a/RecipesPipeline/.github/workflows/CI.yml b/RecipesPipeline/.github/workflows/CI.yml index 27bf4c8b8..31bcc7a4c 100644 --- a/RecipesPipeline/.github/workflows/CI.yml +++ b/RecipesPipeline/.github/workflows/CI.yml @@ -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/checkout@v1.0.0 - - - 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/upload-artifact@v1.0.0 + # 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 diff --git a/RecipesPipeline/.travis.yml b/RecipesPipeline/.travis.yml deleted file mode 100644 index bc8b4670c..000000000 --- a/RecipesPipeline/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux - # - osx -julia: - - 1 - - nightly - -matrix: - allow_failures: - - julia: nightly - -addons: - apt: - packages: - - at-spi2-core - - libgtk-3-dev - - xauth - - xvfb - -env: - - GKS_ENCODING="utf8" - -cache: - directories: - - $HOME/.julia/artifacts - -sudo: required - -notifications: - email: true - -script: - - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - - if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi - - $TESTCMD --project=$(mktemp -d) -e 'using Pkg; pkg"dev .; add Plots#master"; Pkg.build(); Pkg.test("Plots")' diff --git a/RecipesPipeline/Project.toml b/RecipesPipeline/Project.toml index 7eca0c76c..844630fb9 100644 --- a/RecipesPipeline/Project.toml +++ b/RecipesPipeline/Project.toml @@ -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"] diff --git a/RecipesPipeline/test/runtests.jl b/RecipesPipeline/test/runtests.jl index 4134abce0..e8416f934 100644 --- a/RecipesPipeline/test/runtests.jl +++ b/RecipesPipeline/test/runtests.jl @@ -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