Skip to content

Commit

Permalink
Add some more Documenter reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-dG committed Nov 10, 2019
1 parent 8d562d2 commit d5a5eae
Show file tree
Hide file tree
Showing 21 changed files with 256 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/fixtures/DocumenterGitHubActions/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
- push
- pull_request
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '1.0'
- '1.2'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v1
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.0'
- run: julia --project=docs -e '
using Pkg;
Pkg.develop(PackageSpec(; path=pwd()));
Pkg.instantiate();'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions test/fixtures/DocumenterGitHubActions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/docs/build/
Manifest.toml
21 changes: 21 additions & 0 deletions test/fixtures/DocumenterGitHubActions/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 tester

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions test/fixtures/DocumenterGitHubActions/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "DocumenterGitHubActions"
uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
authors = ["tester"]
version = "0.1.0"

[compat]
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
5 changes: 5 additions & 0 deletions test/fixtures/DocumenterGitHubActions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DocumenterGitHubActions

[![Build Status](https://github.com/tester/DocumenterGitHubActions.jl/actions)](https://github.com/tester/DocumenterGitHubActions.jl/workflows/CI/badge.svg)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://tester.github.io/DocumenterGitHubActions.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://tester.github.io/DocumenterGitHubActions.jl/dev)
2 changes: 2 additions & 0 deletions test/fixtures/DocumenterGitHubActions/docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
21 changes: 21 additions & 0 deletions test/fixtures/DocumenterGitHubActions/docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using DocumenterGitHubActions
using Documenter

makedocs(;
modules=[DocumenterGitHubActions],
authors="tester",
repo="https://github.com/tester/DocumenterGitHubActions.jl/blob/{commit}{path}#L{line}",
sitename="DocumenterGitHubActions.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://tester.github.io/DocumenterGitHubActions.jl",
assets=String[],
),
pages=[
"Home" => "index.md",
],
)

deploydocs(;
repo="github.com/tester/DocumenterGitHubActions.jl",
)
12 changes: 12 additions & 0 deletions test/fixtures/DocumenterGitHubActions/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```@meta
CurrentModule = DocumenterGitHubActions
```

# DocumenterGitHubActions

```@index
```

```@autodocs
Modules = [DocumenterGitHubActions]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module DocumenterGitHubActions

# Write your package code here.

end
6 changes: 6 additions & 0 deletions test/fixtures/DocumenterGitHubActions/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using DocumenterGitHubActions
using Test

@testset "DocumenterGitHubActions.jl" begin
# Write your tests here.
end
2 changes: 2 additions & 0 deletions test/fixtures/DocumenterTravis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/docs/build/
Manifest.toml
27 changes: 27 additions & 0 deletions test/fixtures/DocumenterTravis/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Documentation: http://docs.travis-ci.com/user/languages/julia
language: julia
notifications:
email: false
julia:
- 1.0
- 1.2
- nightly
os:
- linux
- osx
- windows
arch:
- x64
jobs:
fast_finish: true
allow_failures:
- julia: nightly
include:
- stage: Documentation
julia: 1.0
script: julia --project=docs -e '
using Pkg;
Pkg.develop(PackageSpec(; path=pwd()));
Pkg.instantiate();
include("docs/make.jl");'
after_success: skip
21 changes: 21 additions & 0 deletions test/fixtures/DocumenterTravis/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 tester

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions test/fixtures/DocumenterTravis/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "DocumenterTravis"
uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
authors = ["tester"]
version = "0.1.0"

[compat]
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
5 changes: 5 additions & 0 deletions test/fixtures/DocumenterTravis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DocumenterTravis

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://tester.github.io/DocumenterTravis.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://tester.github.io/DocumenterTravis.jl/dev)
[![Build Status](https://travis-ci.com/tester/DocumenterTravis.jl.svg?branch=master)](https://travis-ci.com/tester/DocumenterTravis.jl)
2 changes: 2 additions & 0 deletions test/fixtures/DocumenterTravis/docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
21 changes: 21 additions & 0 deletions test/fixtures/DocumenterTravis/docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using DocumenterTravis
using Documenter

makedocs(;
modules=[DocumenterTravis],
authors="tester",
repo="https://github.com/tester/DocumenterTravis.jl/blob/{commit}{path}#L{line}",
sitename="DocumenterTravis.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://tester.github.io/DocumenterTravis.jl",
assets=String[],
),
pages=[
"Home" => "index.md",
],
)

deploydocs(;
repo="github.com/tester/DocumenterTravis.jl",
)
12 changes: 12 additions & 0 deletions test/fixtures/DocumenterTravis/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```@meta
CurrentModule = DocumenterTravis
```

# DocumenterTravis

```@index
```

```@autodocs
Modules = [DocumenterTravis]
```
5 changes: 5 additions & 0 deletions test/fixtures/DocumenterTravis/src/DocumenterTravis.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module DocumenterTravis

# Write your package code here.

end
6 changes: 6 additions & 0 deletions test/fixtures/DocumenterTravis/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using DocumenterTravis
using Test

@testset "DocumenterTravis.jl" begin
# Write your tests here.
end
13 changes: 13 additions & 0 deletions test/reference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ end
])
end

@testset "Documenter (TravisCI)" begin
test_all("DocumenterTravis"; authors=USER, plugins=[
Documenter{TravisCI}(), TravisCI(),
])
end

@testset "Documenter (GitHubActions)" begin
test_all("DocumenterGitHubActions"; authors=USER, plugins=[
Documenter{GitHubActions}(), GitHubActions(),
])
end


@testset "Wacky options" begin
test_all("WackyOptions"; authors=USER, julia=v"1.2", plugins=[
AppVeyor(; x86=true, coverage=true, extra_versions=[v"1.3"]),
Expand Down

0 comments on commit d5a5eae

Please sign in to comment.