Skip to content

Commit 06afc70

Browse files
authored
CI and docs updates (#272)
1 parent 1cd34de commit 06afc70

File tree

9 files changed

+141
-138
lines changed

9 files changed

+141
-138
lines changed

.github/workflows/CI.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,33 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
version:
24-
- '1.6'
25-
- '1' # latest 1.X
24+
- '1.6' # oldest LTS supported
25+
- '1.10'
26+
- '1' # latest stable release
2627
experimental:
2728
- false
28-
os:
29-
- ubuntu-latest
30-
- windows-latest
31-
- macOS-latest
29+
os: [ubuntu-latest, windows-latest, macos-latest]
3230
arch: [x64]
3331
include:
3432
- os: ubuntu-latest
3533
experimental: true
36-
version: '~1.11.0-0' # upcoming julia version, next `rc`
34+
version: 'pre'
3735
arch: x64
3836
- os: ubuntu-latest
3937
experimental: true
4038
version: 'nightly'
4139
arch: x64
4240
steps:
43-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v6
4442
- uses: julia-actions/setup-julia@latest
4543
with:
4644
version: ${{ matrix.version }}
4745
arch: ${{ matrix.arch }}
48-
- uses: julia-actions/cache@v1
46+
- uses: julia-actions/cache@v2
4947
- uses: julia-actions/julia-buildpkg@latest
5048
- uses: julia-actions/julia-runtest@latest
5149
- uses: julia-actions/julia-processcoverage@latest
52-
- uses: codecov/codecov-action@v3
50+
- uses: codecov/codecov-action@v5
5351
with:
5452
file: lcov.info
5553

@@ -59,10 +57,9 @@ jobs:
5957
- uses: julia-actions/setup-julia@latest
6058
with:
6159
version: '1' # latest 1.X
62-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v6
6361
- name: Install JuliaFormatter and format
6462
# This will use the latest version by default but you can set the version like so:
65-
#
6663
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
6764
run: |
6865
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Documentation
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ['master', 'release-']
7+
tags: '*'
8+
release:
9+
types: [published]
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'documentation') }}
19+
permissions:
20+
actions: write
21+
contents: write
22+
pull-requests: read
23+
statuses: write
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v6
27+
- uses: julia-actions/setup-julia@latest
28+
- uses: julia-actions/cache@v2
29+
- name: Install dependencies
30+
run: julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
31+
- name: Build and deploy
32+
run: julia --color=yes --project=docs docs/make.jl
33+
env:
34+
DOCUMENTER_KEY: ${{secrets.DOCUMENTER_KEY}}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Invalidations.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
- uses: julia-actions/setup-julia@v1
2222
with:
2323
version: '1'
24-
- uses: actions/checkout@v3
25-
- uses: julia-actions/julia-buildpkg@v1
24+
- uses: actions/checkout@v6
25+
- uses: julia-actions/julia-buildpkg@latest
2626
- uses: julia-actions/julia-invalidations@v1
2727
id: invs_pr
2828

2929

30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v6
3131
with:
3232
ref: ${{ github.event.repository.default_branch }}
33-
- uses: julia-actions/julia-buildpkg@v1
33+
- uses: julia-actions/julia-buildpkg@latest
3434
- uses: julia-actions/julia-invalidations@v1
3535
id: invs_default
3636

.github/workflows/documentation.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/unused_dependencies.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
treeshake:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: julia-actions/setup-julia@v1
13+
- uses: actions/checkout@v6
14+
- uses: julia-actions/setup-julia@latest
1515
with:
1616
version: 1
17-
- uses: julia-actions/julia-buildpkg@v1
17+
- uses: julia-actions/julia-buildpkg@latest
1818
- uses: julia-actions/julia-treeshake@main

Project.toml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1"
2424

2525
[compat]
2626
AbstractTrees = "0.4"
27-
CodeTracking = "1"
27+
CodeTracking = "1 - 3"
2828
Dates = "1"
2929
Highlights = "0.5"
3030
InteractiveUtils = "1"
@@ -41,13 +41,3 @@ UUIDs = "1"
4141
Unicode = "1"
4242
UnicodeFun = "0.4"
4343
julia = "1.6"
44-
45-
[extras]
46-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
47-
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
48-
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
49-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
50-
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
51-
52-
[targets]
53-
test = ["Random", "StableRNGs", "Suppressor", "Test", "TimerOutputs"]

docs/Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
4-
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
53
Term = "22787eb5-b846-44ae-b979-8e399b8463ab"
64

75
[compat]
8-
Documenter = "0.27"
6+
Documenter = "1"
7+
8+
[sources]
9+
Term = {path = ".."}

docs/make.jl

Lines changed: 84 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,89 @@
11
using Term, Documenter
22

3-
DocMeta.setdocmeta!(Term, :DocTestSetup, :(using Term); recursive = true)
3+
(@main)(args) = begin
4+
DocMeta.setdocmeta!(Term, :DocTestSetup, :(using Term); recursive = true)
45

5-
makedocs(;
6-
modules = [Term],
7-
authors = "FedeClaudi <[email protected]> and contributors",
8-
repo = "https://github.com/FedeClaudi/Term.jl/blob/{commit}{path}#{line}",
9-
sitename = "Term.jl",
10-
format = Documenter.HTML(;
11-
prettyurls = get(ENV, "CI", "false") == "true",
12-
canonical = "https://FedeClaudi.github.io/Term.jl",
13-
assets = String[],
14-
collapselevel = 1,
15-
),
16-
strict = false,
17-
pages = [
18-
"Home" => "index.md",
19-
"Basics" => Any[
20-
"basics/basics.md",
21-
"basics/styled_text.md",
22-
"basics/colors_and_theme.md",
23-
"basics/renderables.md",
24-
"basics/tprint.md",
25-
"basics/console.md",
26-
"basics/prompt.md",
27-
"basics/markdown.md",
6+
makedocs(;
7+
modules = [Term],
8+
authors = "FedeClaudi <[email protected]> and contributors",
9+
repo = "https://github.com/FedeClaudi/Term.jl/blob/{commit}{path}#{line}",
10+
sitename = "Term.jl",
11+
format = Documenter.HTML(;
12+
prettyurls = get(ENV, "CI", "false") == "true",
13+
canonical = "https://FedeClaudi.github.io/Term.jl",
14+
assets = String[],
15+
collapselevel = 1,
16+
),
17+
warnonly = true,
18+
pages = [
19+
"Home" => "index.md",
20+
"Basics" => Any[
21+
"basics/basics.md",
22+
"basics/styled_text.md",
23+
"basics/colors_and_theme.md",
24+
"basics/renderables.md",
25+
"basics/tprint.md",
26+
"basics/console.md",
27+
"basics/prompt.md",
28+
"basics/markdown.md",
29+
],
30+
"Renderables" => Any[
31+
"ren/intro.md",
32+
"ren/text.md",
33+
"ren/panel.md",
34+
"ren/table.md",
35+
"ren/layout_rens.md",
36+
"ren/annotation.md",
37+
"ren/dendogram.md",
38+
"ren/tree.md",
39+
],
40+
"Layout" => Any[
41+
"layout/layout.md",
42+
"layout/nesting.md",
43+
"layout/stacking.md",
44+
"layout/justify.md",
45+
"layout/grid.md",
46+
"layout/compositor.md",
47+
],
48+
"Advanced" => Any[
49+
"adv/adv.md",
50+
"adv/repr.md",
51+
"adv/progressbars.md",
52+
"adv/logging.md",
53+
"adv/errors_tracebacks.md",
54+
"adv/introspection.md",
55+
],
56+
"Live" => [
57+
"live/intro.md",
58+
"live/app_intro.md",
59+
"live/widgets.md",
60+
"live/keyboard_input.md",
61+
],
62+
"API" => Any[
63+
"api/api_term.md",
64+
"api/api_boxes.md",
65+
"api/api_colors.md",
66+
"api/api_console.md",
67+
"api/api_compositors.md",
68+
"api/api_dendograms.md",
69+
"api/api_errors.md",
70+
"api/api_grid.md",
71+
"api/api_introspection.md",
72+
"api/api_layout.md",
73+
"api/api_logs.md",
74+
"api/api_markdown.md",
75+
"api/api_measures.md",
76+
"api/api_panels.md",
77+
"api/api_renderables.md",
78+
"api/api_repr.md",
79+
"api/api_segments.md",
80+
"api/api_style.md",
81+
"api/api_tables.md",
82+
"api/api_tprint.md",
83+
"api/api_trees.md",
84+
],
2885
],
29-
"Renderables" => Any[
30-
"ren/intro.md",
31-
"ren/text.md",
32-
"ren/panel.md",
33-
"ren/table.md",
34-
"ren/layout_rens.md",
35-
"ren/annotation.md",
36-
"ren/dendogram.md",
37-
"ren/tree.md",
38-
],
39-
"Layout" => Any[
40-
"layout/layout.md",
41-
"layout/nesting.md",
42-
"layout/stacking.md",
43-
"layout/justify.md",
44-
"layout/grid.md",
45-
"layout/compositor.md",
46-
],
47-
"Advanced" => Any[
48-
"adv/adv.md",
49-
"adv/repr.md",
50-
"adv/progressbars.md",
51-
"adv/logging.md",
52-
"adv/errors_tracebacks.md",
53-
"adv/introspection.md",
54-
],
55-
"Live" => [
56-
"live/intro.md",
57-
"live/app_intro.md",
58-
"live/widgets.md",
59-
"live/keyboard_input.md",
60-
],
61-
"API" => Any[
62-
"api/api_term.md",
63-
"api/api_boxes.md",
64-
"api/api_colors.md",
65-
"api/api_console.md",
66-
"api/api_compositors.md",
67-
"api/api_dendograms.md",
68-
"api/api_errors.md",
69-
"api/api_grid.md",
70-
"api/api_introspection.md",
71-
"api/api_layout.md",
72-
"api/api_logs.md",
73-
"api/api_markdown.md",
74-
"api/api_measures.md",
75-
"api/api_panels.md",
76-
"api/api_renderables.md",
77-
"api/api_repr.md",
78-
"api/api_segments.md",
79-
"api/api_style.md",
80-
"api/api_tables.md",
81-
"api/api_tprint.md",
82-
"api/api_trees.md",
83-
],
84-
],
85-
)
86+
)
8687

87-
deploydocs(; repo = "github.com/FedeClaudi/Term.jl")
88+
deploydocs(; repo = "github.com/FedeClaudi/Term.jl")
89+
end

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
44
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
55
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
66
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
7+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
78
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
89
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
910
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

0 commit comments

Comments
 (0)