Skip to content

Commit 98b3dea

Browse files
committed
Update CI and docs generation
1 parent f699e45 commit 98b3dea

10 files changed

+73
-49
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CompatHelper.yml

+13
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,23 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v1
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
1023
- name: "Add the General registry via Git"
1124
run: |
1225
import Pkg

.github/workflows/TagBot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
types:
55
- created
66
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
10+
permissions:
11+
contents: write
712
jobs:
813
TagBot:
914
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

.github/workflows/ci.yml

+13-35
Original file line numberDiff line numberDiff line change
@@ -43,57 +43,35 @@ jobs:
4343
os: windows-latest
4444
arch: x64
4545
steps:
46-
- uses: actions/checkout@v2
47-
- uses: julia-actions/setup-julia@latest
46+
- uses: actions/checkout@v4
47+
- uses: julia-actions/setup-julia@v2
4848
with:
4949
version: ${{ matrix.version }}
5050
arch: ${{ matrix.arch }}
51-
- name: Cache artifacts
52-
uses: actions/cache@v2
53-
env:
54-
cache-name: cache-artifacts
55-
with:
56-
path: ~/.julia/artifacts
57-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
58-
restore-keys: |
59-
${{ runner.os }}-test-${{ env.cache-name }}-
60-
${{ runner.os }}-test-
61-
${{ runner.os }}-
62-
- uses: julia-actions/julia-buildpkg@latest
63-
env:
64-
PYTHON: 'Conda'
65-
- uses: julia-actions/julia-runtest@latest
51+
- uses: julia-actions/cache@v2
52+
- uses: julia-actions/julia-buildpkg@v1
53+
- uses: julia-actions/julia-runtest@v1
6654
with:
6755
coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }}
6856
- uses: julia-actions/julia-processcoverage@v1
6957
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
70-
- uses: codecov/codecov-action@v1
58+
- uses: codecov/codecov-action@v4
7159
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
7260
with:
61+
fail_ci_if_error: true
62+
token: ${{ secrets.CODECOV_TOKEN }}
7363
file: lcov.info
7464
docs:
7565
name: Documentation
7666
runs-on: ubuntu-latest
7767
steps:
78-
- uses: actions/checkout@v2
79-
- uses: julia-actions/setup-julia@latest
68+
- uses: actions/checkout@v4
69+
- uses: julia-actions/setup-julia@v2
8070
with:
8171
version: '1'
82-
- name: Cache artifacts
83-
uses: actions/cache@v2
84-
env:
85-
cache-name: cache-artifacts
86-
with:
87-
path: ~/.julia/artifacts
88-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/docs/Project.toml') }}
89-
restore-keys: |
90-
${{ runner.os }}-test-${{ env.cache-name }}-
91-
${{ runner.os }}-test-
92-
${{ runner.os }}-
93-
- uses: julia-actions/julia-buildpkg@latest
94-
env:
95-
PYTHON: 'Conda'
96-
- uses: julia-actions/julia-docdeploy@latest
72+
- uses: julia-actions/cache@v2
73+
- uses: julia-actions/julia-buildpkg@v1
74+
- uses: julia-actions/julia-docdeploy@v1
9775
env:
9876
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9977
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177

docs/Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
44

55
[compat]
6-
Documenter = "~0.27"
6+
Documenter = "1"

docs/make.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ makedocs(
2929
],
3030
doctest = ("fixdoctests" in ARGS) ? :fix : true,
3131
linkcheck = !("nonstrict" in ARGS),
32-
strict = !("nonstrict" in ARGS),
32+
warnonly = ("nonstrict" in ARGS),
3333
)
3434

3535
deploydocs(

test/Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
23
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
34
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
45
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
@@ -10,4 +11,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1011
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1112

1213
[compat]
13-
Documenter = "~0.27"
14+
Documenter = "1"

test/runtests.jl

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
# This file is a part of ForwardDiffPullbacks.jl, licensed under the MIT License (MIT).
22

33
import Test
4-
import ForwardDiffPullbacks
5-
import Documenter
64

75
Test.@testset "Package ForwardDiffPullbacks" begin
6+
include("test_aqua.jl")
87
include("test_fwd_back.jl")
98
include("test_rrules.jl")
109
include("test_zygote.jl")
11-
12-
# doctests
13-
Documenter.DocMeta.setdocmeta!(
14-
ForwardDiffPullbacks,
15-
:DocTestSetup,
16-
:(using ForwardDiffPullbacks);
17-
recursive=true,
18-
)
19-
Documenter.doctest(ForwardDiffPullbacks)
10+
include("test_docs.jl")
2011
end # testset

test/test_aqua.jl

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is a part of ForwardDiffPullbacks.jl, licensed under the MIT License (MIT).
2+
3+
import Test
4+
import Aqua
5+
import ForwardDiffPullbacks
6+
7+
Test.@testset "Package ambiguities" begin
8+
Test.@test isempty(Test.detect_ambiguities(ForwardDiffPullbacks))
9+
end # testset
10+
11+
Test.@testset "Aqua tests" begin
12+
Aqua.test_all(
13+
ForwardDiffPullbacks,
14+
ambiguities = false
15+
)
16+
end # testset

test/test_docs.jl

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file is a part of ForwardDiffPullbacks.jl, licensed under the MIT License (MIT).
2+
3+
using Test
4+
using ForwardDiffPullbacks
5+
import Documenter
6+
7+
Documenter.DocMeta.setdocmeta!(
8+
ForwardDiffPullbacks,
9+
:DocTestSetup,
10+
:(using ForwardDiffPullbacks);
11+
recursive=true,
12+
)
13+
Documenter.doctest(ForwardDiffPullbacks)

0 commit comments

Comments
 (0)