Skip to content

Commit

Permalink
Merge pull request #264 from KristofferC/tp/github-actions-without-do…
Browse files Browse the repository at this point in the history
…cker

use Github Actions w/o Docker for testing
  • Loading branch information
tpapp authored Apr 22, 2021
2 parents bbbabdf + 0c62e4b commit c75fcbd
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 48 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -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 }}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 0 additions & 2 deletions test/coverage/Project.toml

This file was deleted.

12 changes: 0 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c75fcbd

Please sign in to comment.