Skip to content

Commit 8cb3627

Browse files
authored
Minor CI fixes (#158)
1 parent 4b61b15 commit 8cb3627

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,25 @@ on:
99
tags: '*'
1010
jobs:
1111
test:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
version:
18-
- 'lts'
18+
- 'min'
1919
- '1'
2020
- 'pre'
2121
- 'nightly'
2222
os:
2323
- ubuntu-latest
2424
- macOS-latest
2525
- windows-latest
26-
arch:
27-
- x64
2826
steps:
2927
- uses: actions/checkout@v6
30-
- uses: julia-actions/setup-julia@latest
28+
- uses: julia-actions/setup-julia@v3
3129
with:
3230
version: ${{ matrix.version }}
33-
arch: ${{ matrix.arch }}
3431
- uses: julia-actions/cache@v3
3532
- uses: julia-actions/julia-buildpkg@latest
3633
- uses: julia-actions/julia-runtest@latest
@@ -44,7 +41,7 @@ jobs:
4441
Pkg.test("Revise")
4542
'
4643
- name: Test while running Revise
47-
if: ${{ matrix.os == 'ubuntu-latest' && (matrix.version == '1.6' || matrix.version == '1') }}
44+
if: ${{ matrix.os == 'ubuntu-latest' && (matrix.version == 'min' || matrix.version == '1') }}
4845
run: |
4946
TERM="xterm" julia --project -i --code-coverage -e '
5047
using InteractiveUtils, REPL, Revise, Pkg
@@ -67,4 +64,4 @@ jobs:
6764
- uses: julia-actions/julia-processcoverage@latest
6865
- uses: codecov/codecov-action@v7
6966
with:
70-
file: lcov.info
67+
files: lcov.info

‎test/runtests.jl‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,10 @@ end
337337
@test pkgfiles(CodeTracking).id == Base.PkgId(CodeTracking)
338338
end
339339

340-
# REPL (test copied from Revise)
341-
if isdefined(Base, :active_repl)
340+
# REPL (test copied from Revise). `active_repl` is left `nothing` when no
341+
# REPL frontend is running (e.g. a headless CI session whose REPL task has
342+
# already exited at EOF), so the field access below must be guarded.
343+
if isdefined(Base, :active_repl) && !isnothing(Base.active_repl)
342344
hp = Base.active_repl.interface.modes[1].hist
343345
fstr = "__fREPL__(x::Int16) = 0"
344346
histidx = length(hp.history) + 1 - hp.start_idx
@@ -362,7 +364,7 @@ end
362364
pop!(hp.history)
363365
pop!(hp.history)
364366
elseif haskey(ENV, "CI")
365-
error("CI Revise tests must be run with -i")
367+
@warn "REPL tests skipped because no REPL is active"
366368
end
367369
end
368370
end

0 commit comments

Comments
 (0)