Skip to content

Commit 70c1aca

Browse files
committed
CI: add release branch testing and documentation workflows
Add comprehensive CI support for the release branch: - Add vendor-deps.jl.yml: Tests vendored environment by running vendor-deps.jl on the current branch and executing tests - Add release.yml: Runs tests and deploys documentation for the release branch (documentation available at /release/ URL) - Update existing workflows to use branches-ignore for release branch PRs, ensuring only release.yml runs for release-targeted PRs - Update docs/make.jl to support DOCUMENTER_DEVBRANCH environment variable for configurable devbranch and devurl Written by Claude
1 parent b16ee77 commit 70c1aca

File tree

9 files changed

+140
-6
lines changed

9 files changed

+140
-6
lines changed

.github/workflows/Documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Documentation
33
on:
44
push:
55
branches:
6-
- master # update to match your development branch (master, main, dev, trunk, ...)
6+
- master
77
paths:
88
- "docs/**"
99
- ".github/workflows/Documentation.yml"
@@ -38,5 +38,5 @@ jobs:
3838
- name: Build and deploy
3939
run: julia --color=yes --project=docs docs/make.jl
4040
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
42-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/JETLS.jl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- "LSP/**"
1111
- ".github/workflows/JETLS.jl.yml"
1212
pull_request:
13+
branches-ignore:
14+
- release
1315
paths:
1416
- "src/**"
1517
- "test/**"

.github/workflows/LSP.jl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- "LSP/**"
99
- ".github/workflows/LSP.jl.yml"
1010
pull_request:
11+
branches-ignore:
12+
- release
1113
paths:
1214
- "LSP/**"
1315
- ".github/workflows/LSP.jl.yml"

.github/workflows/jetls-client.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- "jetls-client/**"
99
- ".github/workflows/jetls-client.yml"
1010
pull_request:
11+
branches-ignore:
12+
- release
1113
paths:
1214
- "jetls-client/**"
1315
- ".github/workflows/jetls-client.yml"

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
pull_request:
8+
branches:
9+
- release
10+
11+
jobs:
12+
test:
13+
name: Test JETLS.jl with the release environment
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: julia-actions/setup-julia@v2
18+
with:
19+
version: "1.12" # most stable version
20+
arch: x64
21+
- uses: julia-actions/cache@v2
22+
23+
- uses: julia-actions/julia-buildpkg@latest
24+
- uses: julia-actions/julia-runtest@latest
25+
26+
test_jetls:
27+
name: Test jetls executable with the release environment
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: julia-actions/setup-julia@v1
32+
with:
33+
version: "1.12"
34+
arch: x64
35+
- uses: julia-actions/julia-buildpkg@latest
36+
- name: run test
37+
run: |
38+
julia --startup-file=no --project=./test ./test/test_jetls.jl
39+
40+
docs:
41+
name: Documentation
42+
if: github.event_name == 'push'
43+
permissions:
44+
actions: write
45+
contents: write
46+
pull-requests: read
47+
statuses: write
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: julia-actions/setup-julia@v2
52+
with:
53+
version: "1"
54+
- uses: julia-actions/cache@v2
55+
- name: Install dependencies
56+
shell: julia --color=yes --project=docs {0}
57+
run: |
58+
using Pkg
59+
Pkg.develop(PackageSpec(path=pwd()))
60+
Pkg.instantiate()
61+
- name: Build and deploy
62+
run: julia --color=yes --project=docs docs/make.jl
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
66+
DOCUMENTER_DEVBRANCH: release
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: vendor-deps.jl
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "src/**"
9+
- "test/**"
10+
- "LSP/**"
11+
- "scripts/vendor-deps.jl"
12+
- "Project.toml"
13+
- ".github/workflows/vendor-deps.yml"
14+
pull_request:
15+
branches-ignore:
16+
- release
17+
paths:
18+
- "src/**"
19+
- "test/**"
20+
- "LSP/**"
21+
- "scripts/vendor-deps.jl"
22+
- "Project.toml"
23+
- ".github/workflows/vendor-deps.yml"
24+
25+
jobs:
26+
test:
27+
name: Test JETLS.jl with vendored environment
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: julia-actions/setup-julia@v2
32+
with:
33+
version: "1.12" # most stable version
34+
arch: x64
35+
- uses: julia-actions/cache@v2
36+
37+
- name: Run vendor-deps.jl
38+
run: |
39+
julia --startup-file=no scripts/vendor-deps.jl --source-branch=${{ github.head_ref || github.ref_name }}
40+
41+
- name: Show vendored packages
42+
run: |
43+
echo "=== Vendored packages ==="
44+
ls -la vendor/
45+
echo ""
46+
echo "=== Project.toml deps ==="
47+
grep -A 100 '^\[deps\]' Project.toml | head -50
48+
echo ""
49+
echo "=== Project.toml sources ==="
50+
grep -A 100 '^\[sources' Project.toml | head -50
51+
52+
- uses: julia-actions/julia-buildpkg@latest
53+
- uses: julia-actions/julia-runtest@latest

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414
>
1515
> - Commit: [`HEAD`](https://github.com/aviatesk/JETLS.jl/commit/HEAD)
1616
17+
### Added
18+
19+
- Added CI workflow for testing the vendored release environment.
20+
This validates that changes to master don't break the release branch.
21+
(aviatesk/JETLS.jl#321)
22+
- Added CI workflow for the `release` branch with tests and documentation deployment.
23+
Documentation for the `release` branch is now available at <https://aviatesk.github.io/JETLS.jl/release/>.
24+
(aviatesk/JETLS.jl#321)
25+
1726
### Fixed
1827

1928
- Fixed vendoring script to remove unused weakdeps and extensions from vendored
2029
packages. These could interact with user's package environment unexpectedly.
2130
Extensions that are actually used by JETLS are preserved with updated UUIDs.
22-
Fixes aviatesk/JETLS.jl#312. (aviatesk/JETLS.jl#XXX)
31+
Fixes aviatesk/JETLS.jl#312. (aviatesk/JETLS.jl#320)
2332

2433
## [2025-11-24]
2534

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
JETLS = "a3b70258-0602-4ee2-b5a6-54c2470400db"

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ makedocs(;
2222
deploydocs(;
2323
repo = "github.com/aviatesk/JETLS.jl",
2424
push_preview = true,
25-
devbranch = "master",
25+
devbranch = get(ENV, "DOCUMENTER_DEVBRANCH", "master"),
26+
devurl = get(ENV, "DOCUMENTER_DEVBRANCH", "dev"),
2627
)

0 commit comments

Comments
 (0)