Skip to content

Commit cc1aa43

Browse files
authored
CI: add release branch testing and documentation workflows (#321)
1 parent b16ee77 commit cc1aa43

File tree

11 files changed

+212
-58
lines changed

11 files changed

+212
-58
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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.jl.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.jl.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: Fetch branch for vendor-deps.jl
38+
run: |
39+
git fetch origin ${{ github.head_ref || github.ref_name }}
40+
- name: Run vendor-deps.jl
41+
run: |
42+
julia --startup-file=no --project=. scripts/vendor-deps.jl --source-branch=origin/${{ github.head_ref || github.ref_name }} --local
43+
44+
- name: Show vendored packages
45+
run: |
46+
echo "=== Vendored packages ==="
47+
ls -la vendor/
48+
echo ""
49+
echo "=== Project.toml deps ==="
50+
grep -A 100 '^\[deps\]' Project.toml | head -50
51+
echo ""
52+
echo "=== Project.toml sources ==="
53+
grep -A 100 '^\[sources' Project.toml | head -50
54+
55+
- uses: julia-actions/julia-buildpkg@latest
56+
- 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

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ analyzing.
241241

242242
3. Vendor dependency packages
243243
```bash
244-
julia scripts/vendor-deps.jl --source-branch=master
244+
julia --startup-file=no --project=. scripts/vendor-deps.jl --source-branch=master
245245
```
246246
This script performs the following:
247247
- Fetches the latest `Project.toml` from the `master` branch

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)