diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..80058142 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,81 @@ +# from https://discourse.julialang.org/t/easy-workflow-file-for-setting-up-github-actions-ci-for-your-julia-package/49765 + +name: CI +on: + pull_request: + branches: + - master + push: + branches: + - master + tags: '*' +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.0' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. + - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. + - 'nightly' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - run: | + sudo apt-get update && \ + sudo apt-get install --no-install-recommends -qq texlive-latex-base git \ + texlive-luatex texlive-pictures texlive-latex-extra pdf2svg \ + poppler-utils gnuplot-nox wget ca-certificates openssh-client rsync file + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: | + sudo apt-get update && \ + sudo apt-get install --no-install-recommends -qq texlive-latex-base git \ + texlive-luatex texlive-pictures texlive-latex-extra pdf2svg \ + poppler-utils gnuplot-nox wget ca-certificates openssh-client rsync file + - run: | + julia --project=docs -e ' + using Documenter: doctest, DocMeta + using PGFPlotsX + DocMeta.setdocmeta!(PGFPlotsX, :DocTestSetup, :(using PGFPlotsX); recursive=true) + doctest(PGFPlotsX)' + - run: julia --project=docs docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7cd05c10..00000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia/ -language: julia -os: - - linux -julia: - - 1.0 - - 1.5 - - nightly - -# matrix: -# allow_failures: -# - julia: nightly - -dist: trusty - -sudo: required - -services: - - docker - -before_install: - - echo "**** pulling Docker image" - - docker pull tkpapp/texlive-julia-minimal -notifications: - email: false -script: - - echo "**** running Docker" - - docker run --env-file travis_docker_env.list -t -a STDOUT -a STDIN -a STDERR -v $PWD:/mnt tkpapp/texlive-julia-minimal /mnt/travis_docker_test_script.sh $TRAVIS_JULIA_VERSION -after_success: - # push coverage results to Coveralls, .cov files were copied back by script above - - echo "**** submitting coverage information" - - julia --project=test/coverage -e 'using Pkg; Pkg.instantiate(); - using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/README.md b/README.md index f7b2b86e..dc14e3f0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ | **Documentation** | **Build Status** | |:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:| -| [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url] | [![][travis-img]][travis-url] [![codecov](https://codecov.io/gh/KristofferC/PGFPlotsX.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/KristofferC/PGFPlotsX.jl)| +| [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url] | [![build](https://github.com/KristofferC/PGFPlotsX.jl/workflows/CI/badge.svg)](https://github.com/KristofferC/PGFPlotsX.jl/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/KristofferC/PGFPlotsX.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/KristofferC/PGFPlotsX.jl)| + *PGFPlotsX* is a Julia package to generate publication quality figures using the LaTeX library PGFPlots. diff --git a/docs/Project.toml b/docs/Project.toml index 9743546e..c78255a2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -8,3 +8,6 @@ LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" + +[compat] +Documenter = "~0.26" diff --git a/test/coverage/Project.toml b/test/coverage/Project.toml deleted file mode 100644 index 4fbdc477..00000000 --- a/test/coverage/Project.toml +++ /dev/null @@ -1,2 +0,0 @@ -[deps] -Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037" diff --git a/test/runtests.jl b/test/runtests.jl index 039f168b..f9284a99 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,15 +34,3 @@ include("test_elements.jl") mktempdir() do tmp; cd(tmp) do include("test_build.jl") end end - -# Build the docs on Julia v1.3 -if get(ENV, "TRAVIS_JULIA_VERSION", nothing) == "1.5" - cd(joinpath(@__DIR__, "..")) do - withenv("JULIA_LOAD_PATH" => nothing) do - cmd = `$(Base.julia_cmd()) --depwarn=no --color=yes --project=docs/` - coverage = Base.JLOptions().code_coverage == 0 ? "none" : "user" - run(`$(cmd) -e 'using Pkg; Pkg.instantiate()'`) - run(`$(cmd) --code-coverage=$(coverage) docs/make.jl`) - end - end -end