Skip to content

Commit

Permalink
CI updates (#56)
Browse files Browse the repository at this point in the history
* docs and coverage uses travis-ci
* unit test uses github action
* appveyor is not used anymore
* update docs/make.jl for Documenter v0.24
  • Loading branch information
johnnychen94 authored Jun 22, 2020
1 parent 170b7e0 commit 0c335a6
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 86 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit test

on:
create:
tags:
push:
branches:
- master
pull_request:
schedule:
- cron: '20 00 1 * *'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.0', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/[email protected]
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}

- name: "Unit Test"
uses: julia-actions/julia-runtest@master

# Unless tokenless upload is enabled, we can only submit coverage via
# environment variable. But PRs from other fork can't do that.
# See issue: https://github.com/julia-actions/julia-uploadcodecov/issues/1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.jl.*.cov
*.jl.mem
/Manifest.toml
/docs/Manifest.toml
50 changes: 15 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,21 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/
# Until https://github.com/julia-actions/julia-uploadcodecov/issues/1 get fixed
# submit coverage report via travis
language: julia
os:
- linux
- osx
julia:
- 1.0
- 1
- nightly
julia: 1.0
os: linux
notifications:
email: false
git:
depth: 99999999

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia: nightly

## uncomment and modify the following lines to manually install system packages
#addons:
# apt: # apt-get for linux
# packages:
# - gfortran
#before_script: # homebrew for mac
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi
email: false

env:
- DOCUMENTER_DEBUG=true
jobs:
include:
- stage: deploy
julia: 1.0
os: linux
script:
- julia -e 'import Pkg; ps=Pkg.PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps)'
- julia -e 'import ReferenceTests; ENV["DOCUMENTER_DEBUG"] = "true"; include(joinpath("docs","make.jl"))'
- stage: Coverage
codecov: true
coveralls: true

# use default script for test

after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
- stage: Documentation
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ to be used alongside `Base.Test`._

| **Package Status** | **Package Evaluator** | **Build Status** |
|:------------------:|:---------------------:|:-----------------:|
| [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://evizero.github.io/ReferenceTests.jl/latest) | [![Pkg Eval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/R/ReferenceTests.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html) | [![Travis](https://travis-ci.org/Evizero/ReferenceTests.jl.svg?branch=master)](https://travis-ci.org/Evizero/ReferenceTests.jl) [![AppVeyor](https://ci.appveyor.com/api/projects/status/fle0090403pdgnxi?svg=true)](https://ci.appveyor.com/project/Evizero/referencetests-jl) [![Coverage Status](https://coveralls.io/repos/Evizero/ReferenceTests.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/Evizero/ReferenceTests.jl?branch=master) |
| [![License][license-img]][license-url] [![Docs-stable][docs-stable-img]][docs-stable-url] | [![pkgeval][pkgeval-img]][pkgeval-url] | [![unit test][action-img]][action-url] [![codecov][codecov-img]][codecov-url] [![coverall][coverall-img]][coverall-url] |

## Introduction

Expand Down Expand Up @@ -98,3 +98,16 @@ on `@test_reference` within Julia's REPL:
## License

This code is free to use under the terms of the MIT license.

[license-img]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat
[license-url]: LICENSE.md
[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/R/ReferenceTests.svg
[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html
[action-img]: https://github.com/JuliaTesting/ReferenceTests.jl/workflows/Unit%20test/badge.svg
[action-url]: https://github.com/JuliaTesting/ReferenceTests.jl/actions
[codecov-img]: https://codecov.io/github/JuliaTesting/ReferenceTests.jl/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/JuliaTesting/ReferenceTests.jl?branch=master
[coverall-img]: https://coveralls.io/repos/github/JuliaTesting/ReferenceTests.jl/badge.svg
[coverall-url]: https://coveralls.io/github/JuliaTesting/ReferenceTests.jl
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://JuliaTesting.github.io/ReferenceTests.jl/stable
37 changes: 0 additions & 37 deletions appveyor.yml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf"

[compat]
Documenter = "0.24"
17 changes: 6 additions & 11 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
using Documenter, ReferenceTests

format = Documenter.HTML(edit_link = "master",
prettyurls = get(ENV, "CI", nothing) == "true")

makedocs(
format = format,
modules = [ReferenceTests],
clean = false,
format = :html,
sitename = "ReferenceTests.jl",
authors = "Christof Stocker",
linkcheck = !("skiplinks" in ARGS),
pages = Any[
"Home" => "index.md",
],
html_prettyurls = !("local" in ARGS),
]
)

deploydocs(
repo = "github.com/Evizero/ReferenceTests.jl.git",
target = "build",
julia = "1.0",
deps = nothing,
make = nothing,
)
deploydocs(repo = "github.com/johnnychen94/DemoCards.jl.git")
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Pages = ["index.md"]
@withcolor
@io2str
@test_reference
psnr_equality
```
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ julia> using ReferenceTests
julia> @io2str print(::IO, "Hello World")
"Hello World"
julia> @io2str show(IOContext(::IO, :limit=>true, :displaysize=>(10,10)), "text/plain", ones(10))
"10-element Array{Float64,1}:\\n 1.0\\n 1.0\\n 1.0\\n ⋮ \\n 1.0\\n 1.0"
julia> @io2str show(IOContext(::IO, :limit=>true, :displaysize=>(10,10)), "text/plain", ones(5))
"5-element Array{Float64,1}:\n 1.0\n 1.0\n 1.0\n 1.0\n 1.0"
```
"""
macro io2str(expr)
Expand Down

0 comments on commit 0c335a6

Please sign in to comment.